-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
refactor: migrate buttons to tailwind #13419
refactor: migrate buttons to tailwind #13419
Conversation
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great @TylerAPfledderer.
Since that this is a new Button component, we could place it under the /tailwind
folder to clearly see that this component hasn't been migrated yet on the codebase like the Accordion example or the Link component.
Another thing, naming, the shadcn cli installs the components using snake-case. Do you know if we can configure it to install using CapitalizedCase? I think we should be consistent with that.
src/components/ui/buttons/Button.tsx
Outdated
<BaseLink | ||
ref={ref} | ||
activeStyle={{}} | ||
// TODO: Redress this override when migrating the link component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, yes. Once we merge this and the link PR, we can fix this.
As to moving this under With the component naming, I don't see an option in the schema to automatically change them. This seems to be an opinionated part of the tooling. Also, there are two different styles of component writing? I cannot tell what the difference is! |
Yeah, sounds good! yes, I don't think we can replace them atm. We can replace them later and check for any regressions that we don't currently see now.
Right, weird that they didn't add that to the CLI. We could go later and rename them to be consistent.
Me neither haha. All I see is that they use different font sizes in some places but they are pretty similar. |
@pettinarip should be good to look over. Added a comment in the UI Tests check. |
Hey, I don't see this diff in the last build. Wondering if you fix it. Edit: ah ok, the snapshot went well but when you enter SB you can see the incorrect color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TylerAPfledderer left a few minor comments to polish a bit more but overall looks great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Updates the button components to use ShadCN/Tailwind styling.
Also rebuilds
ButtonTwoLines
to be a little more verbose in determining which type of button component it renders via a deterministic prop, to provide better type guarding.These updates here are isolated to the
tailwind
directory and are not migrated to prod. Update stories are also isolated here to not effect Chromatic snapshots. (To be handled later in conjunction with syncing with updated link components)