material-ui icon indicating copy to clipboard operation
material-ui copied to clipboard

[material-ui][docs] Document Drawer onClose reason in v4

Open albertchae opened this issue 7 months ago • 2 comments

The type shows it is the same as Modal's onClose https://github.com/mui/material-ui/blob/v4.x/packages/material-ui/src/Drawer/Drawer.d.ts#L31-L36

So I copied the documentation line about reason from Modal.d.ts, ran yarn proptypes and yarn docs:api

This generates almost the same doc as modal.md, but there is an additional line in the modal documentation that wasn't present in Modal.d.ts 🤷 https://github.com/mui/material-ui/blob/v4.x/docs/pages/api-docs/modal.md?plain=1#L54

The reason parameter can optionally be used to control the response to onClose

This is already correctly documented in v5

One caveat is that I am targeting the v4.x branch since this documentation needs to be backported there

albertchae avatar Jul 22 '24 12:07 albertchae