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

Fix <BooleanInput> color prop should be configurable globally via MUI defaultProps system #9361

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

antoinefricker
Copy link
Contributor

@antoinefricker antoinefricker commented Oct 13, 2023

fixes #9360

Following the template used in issue:

with defaultProps configuration

export const theme: ThemeOptions = {
    components: {
        MuiSwitch: {
            defaultProps: {
                color: 'warning',
            },
        },
    },
};

image

without

image

when specifying color prop

<p>
    Switch
    <Switch color="success" />
</p>
<p>
    BooleanField
    <BooleanInput source="id" color="success" />
</p>

image

@antoinefricker antoinefricker added the RFR Ready For Review label Oct 13, 2023
Copy link
Contributor

@slax57 slax57 left a comment

Choose a reason for hiding this comment

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

Thanks!

@slax57 slax57 added this to the 4.15.1 milestone Oct 16, 2023
@slax57 slax57 merged commit 1b2ba5c into master Oct 16, 2023
@slax57 slax57 deleted the ra-switchcolor branch October 16, 2023 08:51
@slax57 slax57 changed the title fix: <BooleanInput> color property should be configurable globally through MUI defaultProps system. Fix <BooleanInput> color prop should be configurable globally via MUI defaultProps system Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

<BooleanInput> color property should be configurable globally through MUI defaultProps styling system.
2 participants