38 lines
755 B
TypeScript
38 lines
755 B
TypeScript
import { IconInfoCircle } from "@tabler/icons-react"
|
|
import CustomModal from "./CustomModal"
|
|
import { Flex, Text, ThemeIcon } from "@mantine/core"
|
|
|
|
interface ComponentProps {
|
|
open: boolean
|
|
title: string
|
|
content: string
|
|
onOk: () => void
|
|
onCancel: () => void
|
|
}
|
|
|
|
const ConfirmModal = ({
|
|
open,
|
|
title,
|
|
content,
|
|
onOk,
|
|
onCancel,
|
|
}: ComponentProps) => {
|
|
return (
|
|
<CustomModal
|
|
open={open}
|
|
title={title}
|
|
onOk={onOk}
|
|
onCancel={onCancel}
|
|
centered>
|
|
<Flex align="center" gap="sm">
|
|
<ThemeIcon variant="transparent" color="yellow" size="xl">
|
|
<IconInfoCircle size={28} />
|
|
</ThemeIcon>
|
|
<Text>{content}</Text>
|
|
</Flex>
|
|
</CustomModal>
|
|
)
|
|
}
|
|
|
|
export default ConfirmModal
|