Finalize API key management for accounts
This commit is contained in:
parent
3ef649d984
commit
8d52e2e1a7
6 changed files with 154 additions and 29 deletions
32
resources/scripts/components/elements/ConfirmationModal.tsx
Normal file
32
resources/scripts/components/elements/ConfirmationModal.tsx
Normal file
|
@ -0,0 +1,32 @@
|
|||
import React from 'react';
|
||||
import Modal from '@/components/elements/Modal';
|
||||
|
||||
interface Props {
|
||||
title: string;
|
||||
buttonText: string;
|
||||
children: string;
|
||||
visible: boolean;
|
||||
onConfirmed: () => void;
|
||||
onCanceled: () => void;
|
||||
}
|
||||
|
||||
const ConfirmationModal = ({ title, children, visible, buttonText, onConfirmed, onCanceled }: Props) => (
|
||||
<Modal
|
||||
appear={true}
|
||||
visible={visible}
|
||||
onDismissed={() => onCanceled()}
|
||||
>
|
||||
<h3 className={'mb-6'}>{title}</h3>
|
||||
<p className={'text-sm'}>{children}</p>
|
||||
<div className={'flex items-center justify-end mt-8'}>
|
||||
<button className={'btn btn-secondary btn-sm'} onClick={() => onCanceled()}>
|
||||
Cancel
|
||||
</button>
|
||||
<button className={'btn btn-red btn-sm ml-4'} onClick={() => onConfirmed()}>
|
||||
{buttonText}
|
||||
</button>
|
||||
</div>
|
||||
</Modal>
|
||||
);
|
||||
|
||||
export default ConfirmationModal;
|
Loading…
Add table
Add a link
Reference in a new issue