import Box from '../../box'; import Button from '../../button'; import ConfigProvider from '../../config-provider'; import Dialog from '..'; import React from 'react'; import ReactDOM from 'react-dom'; const popupAlert = () => { Dialog.alert({ title: 'Alert', content: 'alert content alert content...', okProps: { children: 'Custom OK' }, cancelProps: { children: 'Custom cancel' }, onOk: () => console.log('alert ok'), }); }; const popupConfirm = () => { Dialog.confirm({ title: 'Confirm', content: 'confirm content confirm content...', locale: { ok: '这是确定', cancel: '这是取消', }, onOk: () => console.log('confirm ok'), onCancel: () => console.log('confirm cancel'), }); }; const popupShow = () => { const dialog = Dialog.show({ title: 'Custom', content: 'custom content custom content...', footer: ( ), }); }; const popupCustomIcon = () => { Dialog.confirm({ title: 'Confirm', content: 'set icon as "warning" ', messageProps: { type: 'warning', }, onOk: () => console.log('ok'), onCancel: () => console.log('cancel'), }); }; ReactDOM.render( , document.getElementById('dialog-demo-2'), );