Skip to content

Commit

Permalink
[docs] Add note in docs about componentsProps.root taking precedence (
Browse files Browse the repository at this point in the history
mui#33097)

* docs

* docs wording

* run CI

* Update docs/data/base/getting-started/usage/usage.md

Co-authored-by: Michał Dudak <michal.dudak@gmail.com>

Co-authored-by: Michał Dudak <michal.dudak@gmail.com>
  • Loading branch information
2 people authored and Daniel Rabe committed Nov 29, 2022
1 parent 27d883f commit 336b73b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/data/base/getting-started/usage/usage.md
Expand Up @@ -85,6 +85,10 @@ These two examples are equivalent:
<BadgeUnstyled componentsProps={{ root: { id: 'badge1' } }}>
```

:::warning
If both `componentsProps.root` and additional props have the same keys but different values, the `componentsProps.root` props will take precedence. This does not apply to classes and the `style` prop (they will be merged instead).
:::

## Components vs. hooks

MUI Base includes two kinds of building blocks: **components** and **hooks**.
Expand Down

0 comments on commit 336b73b

Please sign in to comment.