Skip to content

Commit

Permalink
[Snackbar] Remove non supported property anchorOrigin.vertical=enter (
Browse files Browse the repository at this point in the history
#13238)

* Remove 'center' value from anchorOrigin propType

* [Snackbar] Remove 'center' value from anchorOrigin propType

* Update api docs for Snackbar
  • Loading branch information
iamhosseindhv authored and oliviertassinari committed Oct 14, 2018
1 parent 61888d7 commit ca49f25
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui/src/Snackbar/Snackbar.d.ts
Expand Up @@ -6,7 +6,7 @@ import { ClickAwayListenerProps } from '../ClickAwayListener';

export interface SnackbarOrigin {
horizontal: 'left' | 'center' | 'right';
vertical: 'top' | 'center' | 'bottom';
vertical: 'top' | 'bottom';
}

export interface SnackbarProps
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui/src/Snackbar/Snackbar.js
Expand Up @@ -282,7 +282,7 @@ Snackbar.propTypes = {
*/
anchorOrigin: PropTypes.shape({
horizontal: PropTypes.oneOf(['left', 'center', 'right']).isRequired,
vertical: PropTypes.oneOf(['top', 'center', 'bottom']).isRequired,
vertical: PropTypes.oneOf(['top', 'bottom']).isRequired,
}),
/**
* The number of milliseconds to wait before automatically calling the
Expand Down
2 changes: 1 addition & 1 deletion pages/api/snackbar.md
Expand Up @@ -20,7 +20,7 @@ import Snackbar from '@material-ui/core/Snackbar';
| Name | Type | Default | Description |
|:-----|:-----|:--------|:------------|
| <span class="prop-name">action</span> | <span class="prop-type">node |   | The action to display. |
| <span class="prop-name">anchorOrigin</span> | <span class="prop-type">{ horizontal: enum:&nbsp;'left'&nbsp;&#124;<br>&nbsp;'center'&nbsp;&#124;<br>&nbsp;'right'<br>, vertical: enum:&nbsp;'top'&nbsp;&#124;<br>&nbsp;'center'&nbsp;&#124;<br>&nbsp;'bottom'<br> } | <span class="prop-default">{ vertical: 'bottom', horizontal: 'center',}</span> | The anchor of the `Snackbar`. |
| <span class="prop-name">anchorOrigin</span> | <span class="prop-type">{ horizontal: enum:&nbsp;'left'&nbsp;&#124;<br>&nbsp;'center'&nbsp;&#124;<br>&nbsp;'right'<br>, vertical: enum:&nbsp;'top'&nbsp;&#124;<br>&nbsp;'bottom'<br> } | <span class="prop-default">{ vertical: 'bottom', horizontal: 'center',}</span> | The anchor of the `Snackbar`. |
| <span class="prop-name">autoHideDuration</span> | <span class="prop-type">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. |
| <span class="prop-name">children</span> | <span class="prop-type">element |   | If you wish the take control over the children of the component you can use this property. When used, you replace the `SnackbarContent` component with the children. |
| <span class="prop-name">classes</span> | <span class="prop-type">object |   | Override or extend the styles applied to the component. See [CSS API](#css-api) below for more details. |
Expand Down

0 comments on commit ca49f25

Please sign in to comment.