feat: disabled button in list component.

This commit is contained in:
Ahmed Bouhuolia
2020-11-24 12:47:03 +02:00
parent 431a6be377
commit a6bc88f83d
6 changed files with 33 additions and 41 deletions

View File

@@ -19,7 +19,6 @@ import { CLASSES } from 'common/classes';
import {
NormalCell,
BalanceCell,
AccountNameAccessor
} from './components';
import withDashboardActions from 'containers/Dashboard/withDashboardActions';
@@ -136,7 +135,7 @@ function AccountsDataTable({
{
id: 'name',
Header: formatMessage({ id: 'account_name' }),
accessor: AccountNameAccessor,
accessor: 'name',
className: 'account_name',
width: 220,
},

View File

@@ -54,31 +54,3 @@ export function InactiveSemafro() {
</Tooltip>
);
}
export function AccountNameAccessor(row) {
return (
<>
<Choose>
<Choose.When condition={!!row.description}>
<Tooltip
className={classNames(
Classes.TOOLTIP_INDICATOR,
'bp3-popover-wrapper--account-desc',
)}
content={row.description}
position={Position.RIGHT_TOP}
hoverOpenDelay={500}
>
{row.name}
</Tooltip>
</Choose.When>
<Choose.Otherwise>{row.name}</Choose.Otherwise>
</Choose>
<If condition={!row.active}>
<InactiveSemafro />
</If>
</>
);
}