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. |