Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Oct 1, 2024
1 parent 0153d49 commit 001336c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/data/material/customization/shadow-dom/shadow-dom.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ const theme = createTheme({

### 3. CSS theme variables (optional)

:::info
If you use TypeScript, you need to [extend the interface of the theme](/material-ui/customization/css-theme-variables/usage/#typescript) first.
:::

If you want to use [CSS theme variables](/material-ui/customization/css-theme-variables/overview/) inside of the shadow DOM, you need to set the selectors for generating the CSS variables:

```diff
Expand All @@ -80,7 +84,7 @@ If you want to use [CSS theme variables](/material-ui/customization/css-theme-va
})
```

Next, use the `shadowRootElement` as the color scheme node for attaching the class:
Finally, set the `colorSchemeNode` prop using `shadowRootElement`, from step 1, as the value:

```diff
<ThemeProvider
Expand Down

0 comments on commit 001336c

Please sign in to comment.