From 701c186bc3044d69ac5f411b05994bf75986075c Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Sun, 20 Dec 2020 12:00:11 -0800 Subject: [PATCH] Use IconButtons in TableActions component --- ui/src/components/TableActions.tsx | 87 +++++++++++++++++------------- 1 file changed, 49 insertions(+), 38 deletions(-) diff --git a/ui/src/components/TableActions.tsx b/ui/src/components/TableActions.tsx index e9b22b7..beb3937 100644 --- a/ui/src/components/TableActions.tsx +++ b/ui/src/components/TableActions.tsx @@ -1,20 +1,27 @@ import React, { useState } from "react"; import { makeStyles } from "@material-ui/core/styles"; -import Button from "@material-ui/core/Button"; -import ButtonGroup from "@material-ui/core/ButtonGroup"; +import Tooltip from "@material-ui/core/Tooltip"; +import PlayArrowIcon from "@material-ui/icons/PlayArrow"; +import DeleteIcon from "@material-ui/icons/Delete"; +import ArchiveIcon from "@material-ui/icons/Archive"; import IconButton from "@material-ui/core/IconButton"; import Menu from "@material-ui/core/Menu"; import MenuItem from "@material-ui/core/MenuItem"; import MoreHorizIcon from "@material-ui/icons/MoreHoriz"; -const useStyles = makeStyles({ +const useStyles = makeStyles((theme) => ({ actionsContainer: { + display: "flex", padding: "4px", }, moreIcon: { marginRight: "8px", }, -}); + iconGroup: { + paddingLeft: theme.spacing(1), + borderLeft: `1px solid ${theme.palette.grey[100]}`, + }, +})); interface Props { allActionPending: boolean; @@ -40,13 +47,15 @@ export default function TableActions(props: Props) { return (
- - - + + + + + {props.showBatchActions && ( - - +
{props.onBatchKillClick && ( - + + { + if (!props.onBatchKillClick) return; + props.onBatchKillClick(); + }} + > + + + )} - - + + + + + + + + + + +
)}
);