Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix toast spacing #6557

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cloudyonthemic
Copy link

Description

This pull request addresses the issue of customizing the spacing between toasts in both the default and New York themes of the Toast component.

Changes:

  • Added a gap prop to the Toast component.
  • Users can now customize the gap between individual toasts by passing a value to the gap prop.
  • The default value for gap is 1rem to ensure the toasts are spaced out properly by default.

Themes Affected:

  • Default theme
  • New York theme

This allows for better control over the visual layout of multiple toasts on the page without requiring any changes to the component's core code.

Related Issue

How to Test

  1. Implement the Toast component in your project.
  2. Pass a gap prop with a custom value to the Toast component (e.g., gap="2rem").
  3. Observe that the spacing between toasts has been adjusted as per the given value.

Usage

Before

Previously, users could not customize the spacing between toasts. The toasts were rendered with a default, fixed gap.

After

<Toaster gap="2rem" />

Copy link

vercel bot commented Feb 3, 2025

@cloudyonthemic is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

@cloudyonthemic
Copy link
Author

@shadcn Thoughts on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant