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