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

Adding props for Drawer to hide or display the x button when the drawer is opened. #3449

Open
mason23zh opened this issue Nov 13, 2023 · 1 comment

Comments

@mason23zh
Copy link

What problem does this feature solve?

As for now, once the drawer is opened there is a x button located on the left top corner of the drawer, it would be great if there is an option to choose either to display or hide the x button.

What does the proposed API look like?

Use case: The current x button would take too much space if the drawer component is been used for some mobile devices, a prop that gives control over this x button would make the drawer component easier to work for the smaller screen size.

@simonguo
Copy link
Member

simonguo commented Nov 17, 2023

Supported in rsuite@5.45.0

// Hide close button
<Drawer closeButton={false}>

// Custom close button
<Drawer closeButton={<button>custom close button</button>}>

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

No branches or pull requests

2 participants