UNPKG

@atlaskit/drawer

Version:

A drawer is a panel that slides in from the left side of the screen.

7 lines • 352 B
import { useContext } from 'react'; import invariant from 'tiny-invariant'; import { EnsureIsInsideDrawerContext } from './ensure-is-inside-drawer-context'; export const useEnsureIsInsideDrawer = () => { const context = useContext(EnsureIsInsideDrawerContext); invariant(context, 'Drawer sub-components must be used within a Drawer component.'); };