swordev / suid

A port of Material-UI (MUI) built with SolidJS.
https://suid.io
MIT License
681 stars 49 forks source link

Feature Request: styleOverrides #106

Open SnowingFox opened 2 years ago

SnowingFox commented 2 years ago
createTheme({
    components: {
      MuiButton: {
        styleOverrides: {
          root: {
            '&:hover': {
              boxShadow: 'none',
            },
          },
          sizeLarge: {
            height: 48,
          },
          containedPrimary: {
            'boxShadow': theme.customShadows.primary,
            '&:hover': {
              backgroundColor: theme.palette.primary.dark,
            },
          },
        },
      },
    }
})

i want to override component props via styleOverrides prop like MUI, but now suid just have defaultProps in components

kuakman commented 3 weeks ago

I landed in here while looking for answers to override component styling.

I tried to use defaultProps.classes for controlling component state classes but they don't seem to always work. If I'm not mistaken, if you try to override them they appear to conflict with the existing component classes (i.e: .css-[hash].Mui-[state]).

is there any other alternative to tweak the default components look and feel via themes? This makes SUID pretty limited in terms of customization.

Hideman85 commented 3 days ago

Same issue here, I need tu play with the button background opacity while keeping the palette primary, secondary plain. How do you workaround this today cause it seem I cannot event trigger the state class?