diff options
author | Determinant <ted.sybil@gmail.com> | 2019-02-16 14:48:42 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-02-16 14:48:42 -0500 |
commit | f44c7b95ec85ce10bf8f4dcb1f0d6cdbd2fd0e7f (patch) | |
tree | 3247fc846b2f6819e656089c56ad7358657bc8d8 /src/Snackbar.tsx | |
parent | 8d9f2e9ccc54c17027c01d7fee8ac67c51044655 (diff) |
clean up more
Diffstat (limited to 'src/Snackbar.tsx')
-rw-r--r-- | src/Snackbar.tsx | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/src/Snackbar.tsx b/src/Snackbar.tsx index f700422..33a47fe 100644 --- a/src/Snackbar.tsx +++ b/src/Snackbar.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import PropTypes from 'prop-types'; import classNames from 'classnames'; import { Theme, withStyles } from '@material-ui/core/styles'; import amber from '@material-ui/core/colors/amber'; @@ -39,21 +38,23 @@ const styles = (theme: Theme) => ({ export type SnackbarVariant = 'error' | 'warning'; -function CustomSnackbar(props: { - classes: { - error: string, - warning: string, - message: string, - icon: string, - iconVariant: string, - close: string - }, - variant: SnackbarVariant, - className?: string, - open: boolean, +type CustomSnackbarProps = { + classes: { + error: string, + warning: string, message: string, - onClose: (event: React.SyntheticEvent<{}>, reason?: string) => void - }) { + icon: string, + iconVariant: string, + close: string + }, + variant: SnackbarVariant, + className?: string, + open: boolean, + message: string, + onClose: (event: React.SyntheticEvent<{}>, reason?: string) => void +}; + +function CustomSnackbar(props: CustomSnackbarProps) { const { classes, className, message, variant, open, onClose } = props; const Icon = variantIcon[variant]; return ( |