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

[@mantine/core] Button: Button is disabled when inside fieldset disabled #2440

Merged
merged 4 commits into from Sep 15, 2022
Merged

[@mantine/core] Button: Button is disabled when inside fieldset disabled #2440

merged 4 commits into from Sep 15, 2022

Conversation

josiahayres
Copy link
Contributor

Fixes #2428 using adding a disabled style to button, as suggested by @UgurKacak.

I added simple storybook story, wrapping the states example in a fieldset disabled, all buttons should be disabled.

I have added a basic test as well, please provide feedback if you'd like to see more details on top.

Copy link
Member

@rtivital rtivital left a comment

Choose a reason for hiding this comment

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

Please also add the same changes to ActionIcon component

@@ -135,6 +135,15 @@ export default createStyles(

'&:active': theme.activeStyles,

'&:disabled': {
Copy link
Member

Choose a reason for hiding this comment

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

Should be &:disabled, &[data-disabled] to avoid styles duplication

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rtivital sure I will add this to ActionIcon too.

Should I be adding this as a new style (as in this screenshot) or simply updating the existing style (the one marked 2 in screenshot):
image

Copy link
Member

Choose a reason for hiding this comment

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

Update the existing one

@rtivital rtivital merged commit 145881b into mantinedev:master Sep 15, 2022
@rtivital
Copy link
Member

Thanks!

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.

Button not disabled when inside HTML <fieldset disabled>
2 participants