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: ApplyPrefix function in CLI not applying prefix correctly in all cases #3534

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

Conversation

danbt
Copy link

@danbt danbt commented Apr 19, 2024

The Issue

  • Have a prefix defined in components.json such as "tw-"
  • Install sonner component with CLI npx shadcn-ui@latest add sonner
  • See how className string has tw- prefix applied correctly
  • Notice how toast, description, actionButton, cancelButton do not have tw- prefix applied
  • The sonner toasts WILL NOT show in browser

Screenshot 2024-04-19 at 10 29 58

The Fix

  • Apply prefix to property assignments, where they exist as children of an ObjectExpression
  • Notice how tw- prefix applied correctly

Screenshot 2024-04-19 at 10 34 29

Copy link

vercel bot commented Apr 19, 2024

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

A member of the Team first needs to authorize 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.

None yet

1 participant