-
Notifications
You must be signed in to change notification settings - Fork 42
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
Created the Button component #38
Conversation
@ritwik-69 Please attach some screenshots demonstrating the various options. |
|
frontend/src/library/button.tsx
Outdated
|
||
|
||
|
||
function Button({ children, onClick,size="medium",bgColor="bg-blue-500",textColor="text-white",borderColor="border-red-500",shape }: ButtonProps) { |
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.
Make the default value of borderColor the textColor, so that it takes the textColor when borderColor isn't passed.
frontend/src/library/button.tsx
Outdated
textColor?: string; | ||
bgColor?: string; | ||
borderColor?: string; | ||
shape?:'rectangle' | 'rounded' | 'circle'; |
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.
You can change "circle" to "pill".
We probably won't need circular buttons anyway.
This commit creates a button component which is reusable and customizable like mentioned in the issue Note:Things like hover effect,focus etc. has still not been implemented as it was not mentioned in the issue Update:updated circles as pills and gave borderColor default value of textColor fixes:shivansh-bhatnagar18#20
@kuv2707 done with the changes |
@shivansh-bhatnagar18 design.. |
@ritwik-69 Closing as it is assigned to someone else after the design discussions |
fixes:#20
Description
Created a button component which is reusable and customizable like mentioned in issue
Checklist
Screenshots (if applicable)
[If your changes include any visual updates, provide screenshots here.]
Example 1: syntax with a sample onClick function.
Result
Example 2:
result