Skip to content

Add support for customization with MUI theme to inputs#10772

Merged
djhi merged 4 commits intonextfrom
customizable-inputs
Jun 16, 2025
Merged

Add support for customization with MUI theme to inputs#10772
djhi merged 4 commits intonextfrom
customizable-inputs

Conversation

@Madeorsk
Copy link
Copy Markdown
Contributor

@Madeorsk Madeorsk commented Jun 9, 2025

Problem

Some inputs are not customizable by themes. This adds a way to set custom styles or props on all inputs.

Solution

Use styled components with a defined name in all inputs.

How To Test

make storybook

Then view an input you want to test with and try to change the default theme. For example:

export const defaultLightTheme: ThemeOptions = deepmerge(
    defaultThemeInvariants,
    {
        //...
        components: {
            //...

+           RaTextInput: {
+               styleOverrides: {
+                   root: {
+                       background: 'red',
+                   },
+               },
+           },
        },
    }
);

You can also directly change the "Themed" story of each input.

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Base automatically changed from override-props to next June 12, 2025 15:22
@djhi djhi added this to the 5.9.0 milestone Jun 16, 2025
@djhi djhi merged commit f80fa27 into next Jun 16, 2025
15 checks passed
@djhi djhi deleted the customizable-inputs branch June 16, 2025 10:02
@djhi djhi changed the title Allow to theme all inputs Add support for customization with MUI theme to inputs Jun 23, 2025
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.

2 participants