Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

RobinMalfait
Copy link
Member

This PR improves the upgrade tool for shadcn/ui projects where the variant = "outline" is incorrectly migrated to variant = "outline-solid".

This PR also handles a few more cases:

// As default argument
function Button({ variant = "outline", ...props }: ButtonProps) { }

// With different kinds of quotes (single, double, backticks)
function Button({ variant = 'outline', ...props }: ButtonProps) { }

// Regardless of whitespace
function Button({ variant="outline", ...props }: ButtonProps) { }

// In JSX
<Button variant="outline" />

// With different quotes and using JavaScript expressions
<Button variant={'outline'} />

// As an object property
buttonVariants({ variant: "outline" })

@RobinMalfait RobinMalfait requested a review from a team as a code owner September 12, 2025 09:14
Copy link
Member

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FINE

@RobinMalfait RobinMalfait enabled auto-merge (squash) September 12, 2025 09:18
@RobinMalfait RobinMalfait merged commit 65bad11 into main Sep 12, 2025
7 checks passed
@RobinMalfait RobinMalfait deleted the fix/improve-upgrading-shadcn branch September 12, 2025 09:20
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.