DEV Community

IvankoB
IvankoB

Posted on

Svelte MUI: Can't get how to use 'sx' property of SMUI components to customize their theme CSS attributes [ TypeScript ]

May be specific NODE modules, TS imports and/or Rollup config steps are required. Currently in my projuect the 'sx' attribute is silently ignored.

<Button
  sx={ sw 
  ? { color: 'blue', bgcolor: 'yellow' } 
: {}
}                   
on:click={() => handleLocaleChange('ua')}
use={[afterMountSetupRuButton]}
>
<Label>UA</Label>
</Button>

Enter fullscreen mode Exit fullscreen mode

Top comments (0)