fix: revert selected files, no need to add tooltips on svg buttons
This commit is contained in:
parent
653f939856
commit
e7805040f0
7 changed files with 47 additions and 134 deletions
|
|
@ -3,11 +3,10 @@ import { Field, useFormikContext } from 'formik'
|
|||
import * as R from 'ramda'
|
||||
import React, { useContext } from 'react'
|
||||
|
||||
import Tooltip from 'src/components/Tooltip'
|
||||
import { Link, IconButton } from 'src/components/buttons'
|
||||
import { Td, Tr } from 'src/components/fake-table/Table'
|
||||
import { Switch } from 'src/components/inputs'
|
||||
import { TL2, P } from 'src/components/typography'
|
||||
import { TL2 } from 'src/components/typography'
|
||||
import { ReactComponent as DisabledDeleteIcon } from 'src/styling/icons/action/delete/disabled.svg'
|
||||
import { ReactComponent as DeleteIcon } from 'src/styling/icons/action/delete/enabled.svg'
|
||||
import { ReactComponent as DisabledEditIcon } from 'src/styling/icons/action/edit/disabled.svg'
|
||||
|
|
@ -55,46 +54,19 @@ const ActionCol = ({ disabled, editing }) => {
|
|||
)}
|
||||
{!editing && enableEdit && (
|
||||
<Td textAlign="center" width={editWidth}>
|
||||
{!disableEdit && (
|
||||
<Tooltip
|
||||
enableOver
|
||||
element={
|
||||
<IconButton
|
||||
className={classes.editButton}
|
||||
onClick={() => onEdit && onEdit(values.id)}>
|
||||
<EditIcon />
|
||||
</IconButton>
|
||||
}>
|
||||
<P>Modify row contents</P>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
{disableEdit && (
|
||||
<IconButton disabled className={classes.editButton}>
|
||||
<DisabledEditIcon />
|
||||
</IconButton>
|
||||
)}
|
||||
<IconButton
|
||||
disabled={disableEdit}
|
||||
className={classes.editButton}
|
||||
onClick={() => onEdit && onEdit(values.id)}>
|
||||
{disableEdit ? <DisabledEditIcon /> : <EditIcon />}
|
||||
</IconButton>
|
||||
</Td>
|
||||
)}
|
||||
{!editing && enableDelete && (
|
||||
<Td textAlign="center" width={deleteWidth}>
|
||||
{!disabled && (
|
||||
<Tooltip
|
||||
enableOver
|
||||
element={
|
||||
<IconButton onClick={() => onDelete(values.id)}>
|
||||
<DeleteIcon />
|
||||
</IconButton>
|
||||
}>
|
||||
<P>Delete row</P>
|
||||
</Tooltip>
|
||||
)}
|
||||
|
||||
{disabled && (
|
||||
<IconButton disabled>
|
||||
<DisabledDeleteIcon />
|
||||
</IconButton>
|
||||
)}
|
||||
<IconButton disabled={disabled} onClick={() => onDelete(values.id)}>
|
||||
{disabled ? <DisabledDeleteIcon /> : <DeleteIcon />}
|
||||
</IconButton>
|
||||
</Td>
|
||||
)}
|
||||
{!editing && enableToggle && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue