Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/**
---
category: components
---
**/
@testable()
@bidirectional()
@themeable(theme, styles)
class DrawerLayout extends Component {
static locatorAttribute = 'data-drawer-layout'
static propTypes = {
/**
* Exactly one of each of the following child types: `DrawerLayout.Content`, `DrawerLayout.Tray`
*/
children: ChildrenPropTypes.oneOfEach([DrawerContent, DrawerTray]),
/**
* Min width for the ``
*/
minWidth: PropTypes.string,
/**
* Function called when the `` is resized and hits the `minWidth` breakpoint
* Called with a boolean value, `true` if the tray is now overlaying the content or `false` if
* it is side by side
*/
onOverlayTrayChange: PropTypes.func
}
static defaultProps = {
children: null,
minWidth: '30rem',
onOverlayTrayChange: (shouldOverlayTray) => {}
---
category: components/deprecated
id: DeprecatedDrawerLayout
---
**/
@deprecated('7.0.0', null, 'Use DrawerLayout from ui-drawer-layout instead.')
@testable()
@bidirectional()
@themeable(theme, styles)
class DrawerLayout extends Component {
static locatorAttribute = 'data-drawer-layout'
static propTypes = {
/**
* Exactly one of each of the following child types: `DrawerLayout.Content`, `DrawerLayout.Tray`
*/
children: ChildrenPropTypes.oneOfEach([DrawerContent, DrawerTray]),
/**
* Min width for the ``
*/
minWidth: PropTypes.string,
/**
* Function called when the `` is resized and hits the `minWidth` breakpoint
* Called with a boolean value, `true` if the tray is now overlaying the content or `false` if
* it is side by side
*/
onOverlayTrayChange: PropTypes.func
}
static defaultProps = {
children: null,
minWidth: '30rem',
onOverlayTrayChange: (shouldOverlayTray) => {}