export declare const DrawerContext: import("react").Context; /** * The `DrawerManager` feature is useful when there are multiple help drawer links on a * page, as it defines the behavior of what happens when a user already has one open and * tries to open another. The `DrawerManager` manages the simplest behavior of closing * all other drawers when a new one opens. * * At the top level of your app or page, you can * define a `` [_context provider_](https://react.dev/learn/passing-data-deeply-with-context) * and then in specific parts of your app that manage individual drawers, you can tap into * the management behavior by calling the `useDrawerManager` hook. The hook provides the * open/closed status of the drawer as well as functions for opening, closing, or toggling * the drawer. * * Here is a minimal example of implementation: * * ```tsx * import { Button, DrawerManager, useDrawerManager } from '@cmsgov/design-system'; * * const ManagedDrawer = (props) => { * const { toggleDrawer, closeDrawer, isDrawerOpen } = useDrawerManager(); * * return ( * <> * * * * ); * } * * // Using components that use the `useDrawerManager` hook inside an app that is * // wrapped in a `DrawerManager` context provider: * * function App() { * return ( * * ... any content * * * * * ); * } * ``` * * Here is a description of the object that the hook returns: * * ```ts * { * isDrawerOpen: boolean; // whether it's open * openDrawer: () => any; // function that opens it * closeDrawer: () => any; // function that closes it * toggleDrawer: () => any; // function that toggles it * } * ``` * * [See also the documentation on the drawer component](https://design.cms.gov/components/drawer/). */ export declare const DrawerManager: (props: any) => import("react/jsx-runtime").JSX.Element; export declare const useDrawerManager: () => { openDrawer: () => any; closeDrawer: () => any; toggleDrawer: () => any; isDrawerOpen: boolean; }; export default DrawerManager;