// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 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; details?: string; } type EmptyStateProps = EmptyStateDataProps & WithStyles; class EmptyState extends React.Component { render() { const { classes, message, details, icon, children } = this.props; return ( {message} { details && {details} } { children && {children} } ); } } type CssRules = 'container' | 'icon'; const styles: StyleRulesCallback = (theme: ArvadosTheme) => ({ container: { textAlign: 'center' }, icon: { color: theme.palette.grey["500"], fontSize: '72px' } }); export default withStyles(styles)(EmptyState);