You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
portainer/app/react/docker/containers/common/confirm-container-delete-mo...

18 lines
556 B

import { ModalType } from '@@/modals';
import { openSwitchPrompt } from '@@/modals/SwitchPrompt';
import { buildConfirmButton } from '@@/modals/utils';
export async function confirmContainerDeletion(title: string) {
const result = await openSwitchPrompt(
title,
'Automatically remove non-persistent volumes',
{
confirmButton: buildConfirmButton('Remove', 'danger'),
modalType: ModalType.Destructive,
'data-cy': 'confirm-container-delete-button',
}
);
return result ? { removeVolumes: result.value } : undefined;
}