From fd024b296793b98bd18e61cf6ae56bbe40417686 Mon Sep 17 00:00:00 2001
From: joshwooding <12938082+joshwooding@users.noreply.github.com>
Date: Tue, 9 Jul 2019 23:14:47 +0100
Subject: [PATCH] Fix Snackbar default props
---
packages/material-ui/src/Snackbar/Snackbar.js | 2 +-
pages/api/snackbar.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/material-ui/src/Snackbar/Snackbar.js b/packages/material-ui/src/Snackbar/Snackbar.js
index 50656f406956fc..3d11c4daa9440e 100644
--- a/packages/material-ui/src/Snackbar/Snackbar.js
+++ b/packages/material-ui/src/Snackbar/Snackbar.js
@@ -96,7 +96,7 @@ export const styles = theme => {
const Snackbar = React.forwardRef(function Snackbar(props, ref) {
const {
action,
- anchorOrigin: { vertical = 'bottom', horizontal = 'center' },
+ anchorOrigin: { vertical, horizontal } = { vertical: 'bottom', horizontal: 'center' },
autoHideDuration,
children,
classes,
diff --git a/pages/api/snackbar.md b/pages/api/snackbar.md
index 71cb3724e020ac..5362c19fc5ddcf 100644
--- a/pages/api/snackbar.md
+++ b/pages/api/snackbar.md
@@ -19,7 +19,7 @@ import Snackbar from '@material-ui/core/Snackbar';
| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| action | node | | The action to display. |
-| anchorOrigin | { horizontal: enum: 'left' |
'center' |
'right'
, vertical: enum: 'top' |
'bottom'
} | { vertical: 'bottom', horizontal: 'center',} | The anchor of the `Snackbar`. |
+| anchorOrigin | { horizontal: enum: 'left' |
'center' |
'right'
, vertical: enum: 'top' |
'bottom'
} | { vertical: 'bottom', horizontal: 'center' } | The anchor of the `Snackbar`. |
| autoHideDuration | number | | The number of milliseconds to wait before automatically calling the `onClose` function. `onClose` should then set the state of the `open` prop to hide the Snackbar. This behavior is disabled by default with the `null` value. |
| children | element | | Replace the `SnackbarContent` component. |
| classes | object | | Override or extend the styles applied to the component. See [CSS API](#css) below for more details. |