mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 04:14:18 +00:00
28 lines
635 B
TypeScript
28 lines
635 B
TypeScript
import React from 'react'
|
|
import ButtonCommon from '../ButtonCommon/ButtonCommon'
|
|
import ModalCommon, { ModalCommonProps } from '../ModalCommon/ModalCommon'
|
|
import s from './ModalInfo.module.scss'
|
|
interface ModalInfoProps extends ModalCommonProps {
|
|
okText?: String
|
|
onOk?: () => void
|
|
}
|
|
|
|
const ModalInfo = ({
|
|
okText = 'Ok',
|
|
onOk,
|
|
children,
|
|
title = 'Confirm',
|
|
...props
|
|
}: ModalInfoProps) => {
|
|
return (
|
|
<ModalCommon {...props} title={title}>
|
|
{children}
|
|
<div className={s.footer}>
|
|
<ButtonCommon onClick={onOk}>{okText}</ButtonCommon>
|
|
</div>
|
|
</ModalCommon>
|
|
)
|
|
}
|
|
|
|
export default ModalInfo
|