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

Created the Button component #38

Closed

Conversation

ritwik-69
Copy link
Contributor

@ritwik-69 ritwik-69 commented Jun 1, 2024

fixes:#20

Description

Created a button component which is reusable and customizable like mentioned in issue

Checklist

  • I have tested these changes locally.
  • I have reviewed the code and ensured it follows the project's coding guidelines.
  • I have updated the documentation, if necessary.
  • I have assigned reviewers to this pull request.

Screenshots (if applicable)

[If your changes include any visual updates, provide screenshots here.]
Example 1: syntax with a sample onClick function.

syntax
Result

button
Example 2:

syntax 2
result

on clicking

@kuv2707
Copy link
Collaborator

kuv2707 commented Jun 1, 2024

@ritwik-69 Please attach some screenshots demonstrating the various options.

@kuv2707 kuv2707 added area: Frontend (structure) Issues related to the react frontend area: Frontend (design) and removed area: Frontend (structure) Issues related to the react frontend labels Jun 1, 2024
@ritwik-69
Copy link
Contributor Author

@ritwik-69 Please attach some screenshots demonstrating the various options.
@kuv2707 please check the changes




function Button({ children, onClick,size="medium",bgColor="bg-blue-500",textColor="text-white",borderColor="border-red-500",shape }: ButtonProps) {
Copy link
Collaborator

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.

textColor?: string;
bgColor?: string;
borderColor?: string;
shape?:'rectangle' | 'rounded' | 'circle';
Copy link
Collaborator

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
@ritwik-69
Copy link
Contributor Author

@kuv2707 done with the changes

@kuv2707
Copy link
Collaborator

kuv2707 commented Jun 3, 2024

@shivansh-bhatnagar18 design..

@kuv2707
Copy link
Collaborator

kuv2707 commented Jun 7, 2024

@ritwik-69 Closing as it is assigned to someone else after the design discussions

@kuv2707 kuv2707 closed this Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants