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

Added Button Components #33

Merged
merged 3 commits into from
Jan 23, 2024
Merged

Conversation

andrewzpu
Copy link
Contributor

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:
image
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:
image
Can be added to pages in this format:
image

@andrewzpu andrewzpu requested a review from adhi0331 as a code owner January 19, 2024 21:31
Copy link
Member

@adhi0331 adhi0331 left a 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)

{ label, kind = "primary", size = "default", disabled = false, className, ...props }: ButtonProps,
ref,
) {
let buttonClass = styles.button;
Copy link
Member

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
Screenshot 2024-01-20 at 7 55 45 PM. 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.

Copy link
Member

@parth4apple parth4apple left a comment

Choose a reason for hiding this comment

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

lgtm

@adhi0331 adhi0331 removed the request for review from aaronchan32 January 23, 2024 17:54
@adhi0331 adhi0331 merged commit c4ddfee into main Jan 23, 2024
2 checks passed
@adhi0331 adhi0331 deleted the feature/andrewzpu/button_components branch January 23, 2024 17:54
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.

[ MISC ] Components - Buttons
4 participants