import { h, Component } from 'preact'; class WBDialog extends Component { constructor(...args) { super(...args); this.state.id = uuid.v4(); } show() { const { id } = this.state; $('#' + id).modal(); } hide() { const { id } = this.state; $('#' + id).modal('hide'); } render({ title, children, accept, reject }, { id }) { return (
); } } WBDialog.defaultProps = { 'title': 'Dialog', 'accept': () => {}, 'reject': () => {} }; export default WBDialog;