Skip to content

Conversation

Madeorsk
Copy link
Contributor

@Madeorsk Madeorsk commented Jun 6, 2025

Problem

Some fields, inputs and buttons are not customizable by themes. This adds a way to set custom styles or props on all fields and on delete button.

Solution

Use styled components with a defined name in all fields and inputs.

Current limits:

  • custom styles does not apply to empty fields

How To Test

make storybook

Then view a field, input or button you want to test with and try to change the default theme. For example:

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

+           RaEmailField: {
+               styleOverrides: {
+                   root: {
+                       color: 'red',
+                   },
+               },
+           },
        },
    }
);

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

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Great job otherwise!

@djhi djhi changed the title Customizable components Allow to customize fields and delete button variants with the MUI theme Jun 10, 2025
Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Almost there!

@djhi djhi merged commit 3ecc932 into next Jun 12, 2025
15 checks passed
@djhi djhi deleted the customizable-components branch June 12, 2025 15:09
@djhi djhi modified the milestones: 5.8.5, 5.9.0 Jun 12, 2025
@djhi djhi changed the title Allow to customize fields and delete button variants with the MUI theme Add support for customization with MUI theme to fields and delete buttons 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
Development

Successfully merging this pull request may close these issues.

2 participants