import { Modal, Button } from '@douyinfe/semi-ui'; import { Animation } from '@douyinfe/semi-animation-react'; import React from 'react'; export default class modalDemo extends React.Component { constructor() { super(); this.state = { visible: false, reverse: false }; this.showDialog = this.showDialog.bind(this); this.handleOk = this.handleOk.bind(this); this.handleCancel = this.handleCancel.bind(this); } showDialog() { this.setState({ reverse: false, visible: true, }); } handleOk(e) { this.setState({ reverse: true, }); } handleCancel(e) { this.setState({ reverse: true, }); } render() { let { reverse, visible } = this.state; return ( <> Open Modal { if (reverse) { this.setState({ visible: false }); } }} > {({ x }) => ( This is a modal with customized styles. More content... )} > ); } }
This is a modal with customized styles.
More content...