Skip to content

Commit

Permalink
edit markdown explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-ot committed Apr 28, 2023
1 parent abfe5be commit c06fcd2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/data/base/components/snackbar/snackbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,15 @@ The Snackbar component is composed of a single root `<div>` slot with no interio

### Custom structure

Use the `slots.root` prop to override the root slot with a custom element:

```jsx
<Snackbar slots={{ root: 'span' }} />
```

:::info
The `slots` prop is available on all non-utility Base components.
See [Overriding component structure](/base/guides/overriding-component-structure/) for full details.
:::

#### Usage with TypeScript

In TypeScript, you can specify the custom component type used in the `slots.root` as a generic to the unstyled component. This way, you can safely provide the custom component's props directly on the component:
Expand Down

0 comments on commit c06fcd2

Please sign in to comment.