Style fix

This commit is contained in:
Ken Hibino 2021-03-01 06:39:02 -08:00
parent 80922cf654
commit 93ef083abc

View File

@ -1,5 +1,4 @@
import React, { useCallback, useState } from "react"; import React, { useCallback, useState } from "react";
import clsx from "clsx";
import { connect, ConnectedProps } from "react-redux"; import { connect, ConnectedProps } from "react-redux";
import { makeStyles } from "@material-ui/core/styles"; import { makeStyles } from "@material-ui/core/styles";
import Table from "@material-ui/core/Table"; import Table from "@material-ui/core/Table";
@ -289,15 +288,15 @@ function ArchivedTasksTable(props: Props & ReduxProps) {
); );
} }
const useRowStyles = makeStyles({ const useRowStyles = makeStyles(theme => ({
actionCell: { actionCell: {
width: "96px", width: "96px",
}, },
activeActionCell: { actionButton: {
display: "flex", marginLeft: 3,
justifyContent: "space-between", marginRight: 3,
}, }
}); }));
interface RowProps { interface RowProps {
task: ArchivedTaskExtended; task: ArchivedTaskExtended;
@ -340,10 +339,7 @@ function Row(props: RowProps) {
<TableCell>{task.error_message}</TableCell> <TableCell>{task.error_message}</TableCell>
<TableCell <TableCell
align="center" align="center"
className={clsx( className={classes.actionCell}
classes.actionCell,
props.showActions && classes.activeActionCell
)}
onMouseEnter={props.onActionCellEnter} onMouseEnter={props.onActionCellEnter}
onMouseLeave={props.onActionCellLeave} onMouseLeave={props.onActionCellLeave}
> >
@ -351,6 +347,7 @@ function Row(props: RowProps) {
<React.Fragment> <React.Fragment>
<Tooltip title="Delete"> <Tooltip title="Delete">
<IconButton <IconButton
className={classes.actionButton}
onClick={props.onDeleteClick} onClick={props.onDeleteClick}
disabled={task.requestPending || props.allActionPending} disabled={task.requestPending || props.allActionPending}
size="small" size="small"
@ -360,6 +357,7 @@ function Row(props: RowProps) {
</Tooltip> </Tooltip>
<Tooltip title="Run"> <Tooltip title="Run">
<IconButton <IconButton
className={classes.actionButton}
onClick={props.onRunClick} onClick={props.onRunClick}
disabled={task.requestPending || props.allActionPending} disabled={task.requestPending || props.allActionPending}
size="small" size="small"