Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design] [🚀 Feature Request]: Drawer support onOk and onCancel like Modal #48

Closed
dengfuping opened this issue Jul 26, 2023 · 1 comment · Fixed by #228
Closed

[Design] [🚀 Feature Request]: Drawer support onOk and onCancel like Modal #48

dengfuping opened this issue Jul 26, 2023 · 1 comment · Fixed by #228

Comments

@dengfuping
Copy link
Collaborator

dengfuping commented Jul 26, 2023

Example

API

Property Description Type Default
onCancel Specify a function that will be called when a user click mask, close button on top left or Cancel button. (e) => void -
onOk Specify a function that will be called when a user click the OK button (e) => void -

Usage

  • Basic Usage
<Drawer title="Title" onOk={() => {}} onCancel={() => {}}>
  <p>Some contents...</p>
  <p>Some contents...</p>
  <p>Some contents...</p>
</Drawer>
  • Hide footer:
<Drawer title="Title" footer={false} onCancel={() => {}}>
  <p>Some contents...</p>
  <p>Some contents...</p>
  <p>Some contents...</p>
</Drawer>
  • Custom footer:
<Drawer title="Title" footer={<CustomFooter />} onCancel={() => {}}>
  <p>Some contents...</p>
  <p>Some contents...</p>
  <p>Some contents...</p>
</Drawer>

Implement

@dengfuping
Copy link
Collaborator Author

Closed by #228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants