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: button component with asChild #162

Merged
merged 2 commits into from
Jul 28, 2024
Merged

Conversation

lawvs
Copy link
Contributor

@lawvs lawvs commented Jul 28, 2024

This pr uses asChid to remove unsafe ts-expect-error directive in the about page.

This pull request also fixes errors when using asChild in the button component.

Screenshot 2024-07-28 at 19 09 11
Error: React.Children.only expected to receive a single React element child.

The loading function also works normally.

Screenshot 2024-07-28 at 19 13 06

Refer to shadcn-ui/ui#3117

Copy link

vercel bot commented Jul 28, 2024

@lawvs is attempting to deploy a commit to the RSS3 Team on Vercel.

A member of the Team first needs to authorize it.

@@ -107,6 +109,7 @@ export const ActionButton = React.forwardRef<
<TooltipTrigger asChild>
<Button
as={as}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I propose to remove the as property from the button and replace it with asChild.

Copy link

vercel bot commented Jul 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
follow ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 28, 2024 11:24am

Copy link
Member

@Innei Innei left a comment

Choose a reason for hiding this comment

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

LGTM

@Innei Innei merged commit 984d2de into RSSNext:main Jul 28, 2024
3 checks passed
@lawvs lawvs deleted the fix/btn-aschild branch July 28, 2024 11:26
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