19 lines
741 B
TypeScript
19 lines
741 B
TypeScript
import { Button, Group, Modal } from '@mantine/core';
|
|
import React from 'react';
|
|
|
|
function YesNoModal( { title, description, action, onClose, opened}:{ title:string, description:string, onClose:()=>void, action:()=>void, opened:boolean} ){
|
|
|
|
return <Modal size="xl" title={title} opened={opened} onClose={onClose} centered>
|
|
{description}
|
|
<Group justify='flex-end' mt="md">
|
|
<Button onClick={()=>{
|
|
onClose()
|
|
action()
|
|
}} color="teal" type="submit">Yes</Button>
|
|
<Button onClick={onClose} color="red" type="submit">No</Button>
|
|
|
|
</Group>
|
|
</Modal>
|
|
}
|
|
|
|
export default YesNoModal; |