mirror of
https://github.com/ershisan99/flashcards-example-project.git
synced 2025-12-18 12:33:22 +00:00
chore: update deps, apply updated eslint ocnfig
This commit is contained in:
@@ -1,26 +1,26 @@
|
||||
import s from './dialog.module.scss'
|
||||
|
||||
import { Button, Modal, ModalProps } from '@/components'
|
||||
|
||||
import s from './dialog.module.scss'
|
||||
|
||||
export type DialogProps = ModalProps & {
|
||||
confirmText?: string
|
||||
cancelText?: string
|
||||
onConfirm?: () => void
|
||||
confirmText?: string
|
||||
onCancel?: () => void
|
||||
onConfirm?: () => void
|
||||
}
|
||||
export const Dialog = ({
|
||||
cancelText = 'Cancel',
|
||||
children,
|
||||
confirmText = 'OK',
|
||||
onCancel,
|
||||
onConfirm,
|
||||
confirmText = 'OK',
|
||||
cancelText = 'Cancel',
|
||||
...modalProps
|
||||
}: DialogProps) => {
|
||||
return (
|
||||
<Modal {...modalProps}>
|
||||
{children}
|
||||
<div className={s.buttons}>
|
||||
<Button variant={'secondary'} onClick={onCancel}>
|
||||
<Button onClick={onCancel} variant={'secondary'}>
|
||||
{cancelText}
|
||||
</Button>
|
||||
<Button onClick={onConfirm}>{confirmText}</Button>
|
||||
|
||||
Reference in New Issue
Block a user