-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added Button Components #33
Conversation
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!!! 🚀 (Just need to fix the lint error and it should be good to merge)
frontend/src/components/Button.tsx
Outdated
{ label, kind = "primary", size = "default", disabled = false, className, ...props }: ButtonProps, | ||
ref, | ||
) { | ||
let buttonClass = styles.button; |
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.
We're getting this error because styles is some any type by default. Here is a hacky solution that you could try
. Basically we just need to create a ButtonStyles type and then import the styles as that type (see const buttonStyles). I tested it and it shouldn't break the functionality of the button component. Go ahead and give this a try and see if the github action check passes.
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
Tracking Info
Resolves #3
Changes
Created Button components (all 8 types of standard buttons + 1 tag button)
Added some global css (for colors) and applied them globally by setting up _app.tsx
Testing
Tested by adding buttons to index.tsx to simulate:
Buttons function correctly
Button components have access to global css variables. When global css variables are changed, the button components also change.
Confirmation of Change
Again, buttons can be seen here:
Can be added to pages in this format: