diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-14 04:31:15 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-14 04:31:15 +0300 |
commit | c30f59c85d8c57a9250635d96e3a295345c45ba7 (patch) | |
tree | 4204659469a928470808318e045e0c0da2cdb3f8 /src/components/EmptyState | |
parent | 917d83bfb70d863944df62fb3ca254ba74e67e6e (diff) | |
download | which-ui-c30f59c85d8c57a9250635d96e3a295345c45ba7.tar.gz |
feat: add message to EmptyState
Diffstat (limited to 'src/components/EmptyState')
-rw-r--r-- | src/components/EmptyState/EmptyState.tsx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/components/EmptyState/EmptyState.tsx b/src/components/EmptyState/EmptyState.tsx index b103e3c..f6a6363 100644 --- a/src/components/EmptyState/EmptyState.tsx +++ b/src/components/EmptyState/EmptyState.tsx @@ -3,6 +3,10 @@ import Typography from '@material-ui/core/Typography'; import { makeStyles } from '@material-ui/core/styles'; import noContentIcon from '../../assets/noContent.svg'; +interface PropTypes { + message?: string; +} + const useStyles = makeStyles(theme => ({ root: { display: 'flex', @@ -17,7 +21,7 @@ const useStyles = makeStyles(theme => ({ })); -const EmptyState: React.FC = () => { +const EmptyState: React.FC<PropTypes> = ({ message }) => { const classes = useStyles(); return ( @@ -26,6 +30,11 @@ const EmptyState: React.FC = () => { <Typography variant="h5"> No content </Typography> + <Typography color="textSecondary"> + <p> + {message} + </p> + </Typography> </div> ); }; |