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
#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
ZeeshanTamboli and michaldudak committed Jun 24, 2022
1 parent c016a75 commit a59baca
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 a59baca

Please sign in to comment.