add all icons to icon component, refactor code and change icons
[arvados-workbench2.git] / src / components / empty-state / empty-state.tsx
index 205053b5ce7f738a1ba2b1627c5d4fb7b86b1c4b..3c21eca3632267160b9f39e918d179fb5172e842 100644 (file)
@@ -6,11 +6,10 @@ import * as React from 'react';
 import Typography from '@material-ui/core/Typography';
 import { WithStyles, withStyles, StyleRulesCallback } from '@material-ui/core/styles';
 import { ArvadosTheme } from 'src/common/custom-theme';
-import IconBase, { IconTypes } from '../icon/icon';
 
 export interface EmptyStateDataProps {
     message: string;
-    icon: IconTypes;
+    icon: (className?: string) => React.ReactElement<any>;
     details?: string;
 }
 
@@ -22,7 +21,7 @@ class EmptyState extends React.Component<EmptyStateProps, {}> {
         const { classes, message, details, icon, children } = this.props;
         return (
             <Typography className={classes.container} component="div">
-                <IconBase icon={icon} className={classes.icon} />
+                {icon(classes.icon)}
                 <Typography variant="body1" gutterBottom>{message}</Typography>
                 { details && <Typography gutterBottom>{details}</Typography> }
                 { children && <Typography gutterBottom>{children}</Typography> }