17782: Fixes almost all tests (4 left) mostly by fixing namespace-type imports.
[arvados-workbench2.git] / src / components / warning-collection / warning-collection.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import React from "react";
6 import { WarningIcon } from "components/icon/icon";
7 import { StyleRulesCallback, DialogContentText, WithStyles, withStyles } from "@material-ui/core";
8 import { ArvadosTheme } from 'common/custom-theme';
9
10 type CssRules = 'container' | 'text';
11
12 const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
13     container: {
14         display: 'flex',
15         alignItems: 'center',
16     },
17     text: {
18         paddingLeft: '8px'
19     }
20 });
21
22 interface WarningCollectionProps {
23     text: string;
24 }
25
26 export const WarningCollection = withStyles(styles)(({ classes, text }: WarningCollectionProps & WithStyles<CssRules>) =>
27     <span className={classes.container}>
28         <WarningIcon />
29         <DialogContentText className={classes.text}>{text}</DialogContentText>
30     </span>);