mirror of
https://github.com/portainer/portainer.git
synced 2025-07-21 14:29:40 +02:00
refactor(tables): use add and delete buttons [EE-6297] (#10668)
Co-authored-by: Chaim Lev-Ari <chaim.levi-ari@portaienr.io>
This commit is contained in:
parent
d88ef03ddb
commit
9600eb6fa1
41 changed files with 369 additions and 727 deletions
|
@ -1,8 +1,6 @@
|
|||
import { Trash2 } from 'lucide-react';
|
||||
|
||||
import { Authorized } from '@/react/hooks/useUser';
|
||||
|
||||
import { Button } from '@@/buttons';
|
||||
import { DeleteButton } from '@@/buttons/DeleteButton';
|
||||
|
||||
import { KubernetesStack } from '../../types';
|
||||
|
||||
|
@ -15,15 +13,12 @@ export function TableActions({
|
|||
}) {
|
||||
return (
|
||||
<Authorized authorizations="K8sApplicationsW">
|
||||
<Button
|
||||
<DeleteButton
|
||||
confirmMessage="Are you sure that you want to remove the selected stack(s) ? This will remove all the applications associated to the stack(s)."
|
||||
disabled={selectedItems.length === 0}
|
||||
color="dangerlight"
|
||||
onClick={() => onRemove(selectedItems)}
|
||||
icon={Trash2}
|
||||
onConfirmed={() => onRemove(selectedItems)}
|
||||
data-cy="k8sApp-removeStackButton"
|
||||
>
|
||||
Remove
|
||||
</Button>
|
||||
/>
|
||||
</Authorized>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue