Skip to content

Commit

Permalink
Clarify not all components have 'component' prop
Browse files Browse the repository at this point in the history
Discussion can be found at #18991
  • Loading branch information
JamieS1211 authored Dec 29, 2019
1 parent f3218f2 commit 676caca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/src/pages/guides/typescript/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,8 @@ const theme = createMyTheme({ appDrawer: { breakpoint: 'md' }});

## Usage of `component` prop

Material-UI allows you to replace a component's root node via a `component` prop.
Many Material-UI components allow you to replace their root node via a `component`
prop, this will be detailed in the component's API documentation.
For example, a Button's root node can be replaced with a React Router's Link, and any additional props that are passed to Button, such as `to`, will be spread to the Link component.
For a code example concerning Button and react-router-dom checkout [these demos](/guides/composition/#routing-libraries).

Expand Down

0 comments on commit 676caca

Please sign in to comment.