Skip to content

Commit

Permalink
updated comment for allowSwipeInChildren
Browse files Browse the repository at this point in the history
  • Loading branch information
tech-meppem committed Jan 3, 2023
1 parent d48c9ee commit 6445cd4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"componentDescription": "",
"propDescriptions": {
"allowSwipeInChildren": "Callback to determine what children of the drawer the user can use to drag open the drawer. Can be a custom function to control the behavior. Set or return true / false to allow / disallow the swipe event.",
"allowSwipeInChildren": "If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children. This can be useful in scenarios where the drawer is partially visible. You can customize it further with a callback that determines which children the user can drag over to open the drawer (for example, to ignore other elements that handle touch move events, like sliders).",
"children": "The content of the component.",
"disableBackdropTransition": "Disable the backdrop transition. This can improve the FPS on low-end devices.",
"disableDiscovery": "If <code>true</code>, touching the screen near the edge of the drawer will not slide in the drawer a bit to promote accidental discovery of the swipe gesture.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { DrawerProps } from '../Drawer';

export interface SwipeableDrawerProps extends Omit<DrawerProps, 'onClose' | 'open'> {
/**
* Callback to determine what children of the drawer the user can use to drag open the drawer.
* Can be a custom function to control the behavior.
* Set or return true / false to allow / disallow the swipe event.
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
* This can be useful in scenarios where the drawer is partially visible.
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
* (for example, to ignore other elements that handle touch move events, like sliders).
*
* @param {TouchEvent} event The 'touchstart' event
* @param {HTMLDivElement} swipeArea The swipe area element
Expand Down
7 changes: 4 additions & 3 deletions packages/mui-material/src/SwipeableDrawer/SwipeableDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,9 +634,10 @@ SwipeableDrawer.propTypes /* remove-proptypes */ = {
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* Callback to determine what children of the drawer the user can use to drag open the drawer.
* Can be a custom function to control the behavior.
* Set or return true / false to allow / disallow the swipe event.
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
* This can be useful in scenarios where the drawer is partially visible.
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
* (for example, to ignore other elements that handle touch move events, like sliders).
*
* @param {TouchEvent} event The 'touchstart' event
* @param {HTMLDivElement} swipeArea The swipe area element
Expand Down

0 comments on commit 6445cd4

Please sign in to comment.