-
Notifications
You must be signed in to change notification settings - Fork 24
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
chore: standardize buttons using a button component #571
Conversation
chore: use a Button component
✅ Deploy Preview for seium-stg 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.
I feel like the title field could be a child component. I know 99% of the time it's text, but for the other 1% it would be really useful. Not to mention, it would be less verbose, more intuitive and better follow the composition model of react.
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.
I would suggest take the ...rest
of the Button Props and pass it to the button element, to allow to use the generic HTML button props at the component level, without need future changes or extra complexity.
I think that if you don't want do this, at least you should correct the Props types with the Typescript Pick or Omit operators, because at this moment is correct, at the typescript level, pass any of the HTML buttons props to this component, even if they aren't used.
Also, if you want accept the changes I think that would be better the customStyle
be the className
(already included at ...rest) so as not to create confusion, since they would overwrite the other
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.
Perfect
chore: use a Button component