Skip to content

fix: Alert components that include a shape and exclude a Title aren't vertically centered #7473 #7481

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

learnwithsatyam
Copy link

Fixed this issue by using "items-center" class in alert.tsx in default and new-york themes. I published some images on the original bug request on #7473

Copy link

vercel bot commented May 28, 2025

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

A member of the Team first needs to authorize it.

@jonathanmarchuot
Copy link

Hey @learnwithsatyam I wasn't able to reproduce your fix on my end. I patched it into components/ui/alert.tsx in my already running application like so:

const AlertDescription = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLParagraphElement>>(
  ({ className, ...props }, ref) => <div ref={ref} className={cn('text-sm [&_p]:leading-relaxed items-center', className)} {...props} />
)

And I can see the style is making it through in the place where it's intended, but I don't see the correction to the vertical alignment in my environment.

I was able to verify that #7491 fixed the problem in my environment, and I commented on that PR to say that there's a single other alignment thing that might be possible to fix at the same time, but it's otherwise solved.

Thank you for looking into it!

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.

2 participants