react-dialogues
v0.1.0
Published
Tiny interaction React UI library
Downloads
18
Readme
react-dialogues
Simple but flexible modal dialog library inspired by Ant Design
WIP! The project is still in beta stage
import { CancelButton, Modal, OkButton } from 'react-dialogues';
export default function App() {
return (
<Button
onClick={async () => {
const result = await Modal.info({
title: 'Information',
content: 'Example',
buttons: [<Modal.OkButton />, <Modal.CancelButton />],
});
if (result === 'ok') {
console.log('Ok button clicked');
} else {
console.log('Cancel button clicked');
}
}}
>
Show Modal
</Button>
);
}