UNPKG

@cimpress/react-components

Version:
45 lines 1.7 kB
import React from 'react'; import { CodeExample } from '@cimpress/react-components'; import SnackbarCode from '!raw-loader!./snackbar.jsx'; import SnackbarDemo from './snackbar.jsx'; import ComponentDoc from '../../shared/TabbedComponentDoc'; const SnackbarDocs = () => { const propInfos = [ { name: 'show', type: 'boolean', default: 'false', description: 'Controls whether or not the snackbar is hidden', }, { name: 'status', type: 'string', default: '"danger"', description: 'One of the four contextual styles: info, success, warning, or danger', }, { name: 'delay', type: 'number', default: '', description: `How long to display the snackbar before autodismissing, in milliseconds. If not provided or if a falsy delay is given, the snackbar must be manually dismissed`, }, { name: 'children', type: 'node', default: '', description: 'Snackbar renders any children given to it as contents on the right-hand side of the snackbar', }, { name: 'onHideSnackbar', type: 'function', default: '', description: 'Callback function to be called when the snackbar auto-dismisses or is closed', }, ]; return (React.createElement(ComponentDoc, { name: "Snackbar", propInfos: propInfos }, React.createElement(SnackbarDemo, null), React.createElement(CodeExample, { code: SnackbarCode }))); }; export default SnackbarDocs; //# sourceMappingURL=index.js.map