-
Notifications
You must be signed in to change notification settings - Fork 4
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
add cancel button #307
add cancel button #307
Conversation
0e7b31f
to
619d22c
Compare
619d22c
to
cfc5ec2
Compare
onClick={onClick} | ||
variant={variant} | ||
disabled={disabled} | ||
sx={{ color: 'inherit' }} |
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.
Why don't you use the color of the theme as suggested in the US ? How can you be sure inherit give you the color you want ?
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.
What happen if you remove the inherit ?
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.
If I remove "inherit", all the buttons take on the default MUI color which is blue in gridexplore. That's the reason why I placed this component in commons UI, so I don't have to repeat "inherit" and it's only to cancel it out.
12e48a4
to
91275ff
Compare
onClick={onClick} | ||
variant={variant} | ||
disabled={disabled} | ||
sx={withCustomColor ? styles.removeButtonTextColor : null} |
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.
Why you use sx
and not the color
prop ?
https://mui.com/material-ui/api/button/#Button-prop-color
onClick, | ||
variant, | ||
disabled, | ||
withCustomColor = false, |
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.
Either rename it in "withOriginalColor", or change the condition below.
onClick={onClick} | ||
variant={variant} | ||
disabled={disabled} | ||
color={withCustomColor ? 'primary' : 'secondary'} |
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.
Don't use secondary it already exist
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.
In the app, "secondary" refers to the pink color. I've overloaded this parameter because the name "secondary" is more descriptive than anything else, but I can change it if you have another name in mind
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 replaced it with customButton
No description provided.