-
Hi there, I am trying to figure out how to customize the Material Theme when using this library. @use "@material/theme" with (
$primary: red,
$on-primary: yellow,
); And in my @JsModule("./index.scss")
private external val Style: dynamic
fun main() {
renderComposable(rootElementId = "root") {
Style
MDCButton(type = MDCButtonType.Raised ) {
Text("Test")
}
}
} But the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Ok I now figured out I can overwrite the renderComposable(rootElementId = "root") {
Div({
style {
property("--mdc-theme-primary","#991b1b")
property("--mdc-theme-accent","grey")
property("--mdc-theme-info","#2f83de")
property("--mdc-theme-warning","#fd921f")
property("--mdc-theme-error","#bb1919")
property("--mdc-theme-success","green")
property("--mdc-theme-background","#ffe9e9")
}
}){
MDCButton(type = MDCButtonType.Raised ) {
Text("Test")
}
}
} |
Beta Was this translation helpful? Give feedback.
-
Mdc (js lib) supports 2 theming approaches:
Here's an example code of scss mixin in use
For all theming in general I suggest refering to each component's mdc js docs as it differs on a component by component basis. |
Beta Was this translation helpful? Give feedback.
Mdc (js lib) supports 2 theming approaches:
Here's an example code of scss mixin in use
For all theming in general I suggest refering to each component's mdc js docs as it differs on a component by component basis.