1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import * as React from 'react';
6 import Typography from '@material-ui/core/Typography';
7 import { WithStyles, withStyles, StyleRulesCallback } from '@material-ui/core/styles';
8 import { ArvadosTheme } from 'src/common/custom-theme';
9 import { IconType } from '../icon/icon';
11 export interface EmptyStateDataProps {
17 type EmptyStateProps = EmptyStateDataProps & WithStyles<CssRules>;
19 class EmptyState extends React.Component<EmptyStateProps, {}> {
22 const { classes, message, details, icon: Icon, children } = this.props;
24 <Typography className={classes.container} component="div">
25 <Icon className={classes.icon} />
26 <Typography variant="body1" gutterBottom>{message}</Typography>
27 { details && <Typography gutterBottom>{details}</Typography> }
28 { children && <Typography gutterBottom>{children}</Typography> }
35 type CssRules = 'container' | 'icon';
36 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
41 color: theme.palette.grey["500"],
46 export default withStyles(styles)(EmptyState);