15856: Replaces icon.
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 2 Dec 2019 20:56:47 +0000 (17:56 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 2 Dec 2019 20:56:47 +0000 (17:56 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

src/components/icon/icon.tsx
src/components/list-item-text-icon/list-item-text-icon.tsx
src/components/warning/warning.tsx

index 44a2b2334bbfb0b2099796aa1d901d5133b41c90..a3d01e9439bcd10c9a59e0a0313b0d9dc7d2e662 100644 (file)
@@ -21,6 +21,7 @@ import CreateNewFolder from '@material-ui/icons/CreateNewFolder';
 import Delete from '@material-ui/icons/Delete';
 import DeviceHub from '@material-ui/icons/DeviceHub';
 import Edit from '@material-ui/icons/Edit';
+import ErrorRoundedIcon from '@material-ui/icons/ErrorRounded';
 import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
 import Folder from '@material-ui/icons/Folder';
 import GetApp from '@material-ui/icons/GetApp';
@@ -73,6 +74,7 @@ export const DetailsIcon: IconType = (props) => <Info {...props} />;
 export const DownloadIcon: IconType = (props) => <GetApp {...props} />;
 export const EditSavedQueryIcon: IconType = (props) => <Create {...props} />;
 export const ExpandIcon: IconType = (props) => <ExpandMoreIcon {...props} />;
+export const ErrorIcon: IconType = (props) => <ErrorRoundedIcon style={{color: '#ff0000'}} {...props} />;
 export const FavoriteIcon: IconType = (props) => <Star {...props} />;
 export const HelpIcon: IconType = (props) => <Help {...props} />;
 export const HelpOutlineIcon: IconType = (props) => <HelpOutline {...props} />;
index c0ee9c1a1c1d38940329b973a09901b408afed12..375538d56a2f753203b94f55ad4f1633750c4777 100644 (file)
@@ -51,7 +51,7 @@ export const ListItemTextIcon = withStyles(styles)(
 
                         <Icon style={{ fontSize: `${iconSize}rem` }} />
                     </ListItemIcon>
-                    {nameDecorator ? nameDecorator : null}
+                    {nameDecorator || null}
                     <ListItemText primary={
                         <Typography className={classnames(classes.listItemText, {
                                 [classes.active]: isActive
index 1a8f44562c99af72ead38972bf0d9b7c3690b223..7299c174983c12507ea2228c1554a51d52a5355c 100644 (file)
@@ -3,7 +3,7 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from "react";
-import { WarningIcon } from "~/components/icon/icon";
+import { ErrorIcon } from "~/components/icon/icon";
 import { Tooltip } from "@material-ui/core";
 
 interface WarningComponentProps {
@@ -15,8 +15,8 @@ interface WarningComponentProps {
 export const WarningComponent = ({ text, rules, message }: WarningComponentProps) =>
     rules.find(aRule => text.match(aRule) !== null)
     ? message
-        ? <Tooltip title={message}><WarningIcon /></Tooltip>
-        : <WarningIcon />
+        ? <Tooltip title={message}><ErrorIcon /></Tooltip>
+        : <ErrorIcon />
     : null;
 
 interface IllegalNamingWarningProps {