Skip to content

Commit

Permalink
Add plain example
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalovf committed Sep 7, 2021
1 parent ce98023 commit 67c413d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/src/pages/components/snackbars/snackbars.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Snackbars should appear above FABs (on mobile).

{{"demo": "pages/components/snackbars/FabIntegrationSnackbar.js", "iframe": true, "maxWidth": 400}}

### Change Transition
### Change transition

[Grow](/components/transitions/#grow) is the default transition but you can use a different one.

Expand All @@ -71,6 +71,22 @@ Snackbars should appear above FABs (on mobile).

You can change the direction of the [Slide](/components/transitions/#slide) transition.

Example of making the slide transition to the left:

```jsx
import Slide from '@material-ui/core/Slide';

function TransitionLeft(props) {
return <Slide {...props} direction="left" />;
}

export default function MyComponent() {
return <Snackbar TransitionComponent={TransitionLeft} />;
}
```

Other examples:

{{"demo": "pages/components/snackbars/DirectionSnackbar.js"}}

## Complementary projects
Expand Down

0 comments on commit 67c413d

Please sign in to comment.