//
// SPDX-License-Identifier: AGPL-3.0
-import * as React from 'react';
+import React from 'react';
import { StyleRulesCallback, WithStyles, withStyles } from '@material-ui/core/styles';
import { ArvadosTheme } from '../../common/custom-theme';
import { Typography } from '@material-ui/core';
import { IconType } from '../icon/icon';
-import * as classnames from "classnames";
+import classnames from "classnames";
type CssRules = 'root' | 'icon' | 'message';
export interface DefaultViewDataProps {
classRoot?: string;
messages: string[];
+ filtersApplied?: boolean;
classMessage?: string;
- icon: IconType;
+ icon?: IconType;
classIcon?: string;
}
export const DefaultView = withStyles(styles)(
({ classes, classRoot, messages, classMessage, icon: Icon, classIcon }: DefaultViewProps) =>
<Typography className={classnames([classes.root, classRoot])} component="div">
- <Icon className={classnames([classes.icon, classIcon])} />
+ {Icon && <Icon className={classnames([classes.icon, classIcon])} />}
{messages.map((msg: string, index: number) => {
- return <Typography key={index} variant="body1"
+ return <Typography key={index}
className={classnames([classes.message, classMessage])}>{msg}</Typography>;
})}
</Typography>
-);
\ No newline at end of file
+);