UNPKG

@awsui/components-react

Version:

On July 19th, 2022, we launched [Cloudscape Design System](https://cloudscape.design). Cloudscape is an evolution of AWS-UI. It consists of user interface guidelines, front-end components, design resources, and development tools for building intuitive, en

44 lines 2.08 kB
import React from 'react'; import { AppLayoutProps } from '../interfaces'; export declare const TOOLS_DRAWER_ID = "awsui-internal-tools"; interface ToolsProps { toolsHide: boolean | undefined; toolsOpen: boolean | undefined; toolsWidth: number; tools: React.ReactNode | undefined; onToolsToggle: (newOpen: boolean) => void; ariaLabels: AppLayoutProps.Labels | undefined; disableDrawersMerge?: boolean; } export interface OnChangeParams { initiatedByUserAction: boolean; } export declare const MIN_DRAWER_SIZE = 290; type UseDrawersProps = Pick<AppLayoutProps, 'drawers' | 'activeDrawerId' | 'onDrawerChange'> & { __disableRuntimeDrawers?: boolean; onGlobalDrawerFocus?: (drawerId: string, open: boolean) => void; onAddNewActiveDrawer?: (drawerId: string) => void; }; export declare function useDrawers({ drawers, activeDrawerId: controlledActiveDrawerId, onDrawerChange, onGlobalDrawerFocus, onAddNewActiveDrawer, __disableRuntimeDrawers: disableRuntimeDrawers, }: UseDrawersProps, ariaLabels: AppLayoutProps['ariaLabels'], toolsProps: ToolsProps): { ariaLabelsWithDrawers: AppLayoutProps.Labels | undefined; drawers: AppLayoutProps.Drawer[] | undefined; activeDrawer: AppLayoutProps.Drawer | undefined; activeDrawerId: string | null; globalDrawers: import("../runtime-drawer").RuntimeDrawer[]; activeGlobalDrawers: import("../runtime-drawer").RuntimeDrawer[]; activeGlobalDrawersIds: string[]; activeGlobalDrawersSizes: Record<string, number>; activeDrawerSize: number; minDrawerSize: number; minGlobalDrawersSizes: Record<string, number>; drawerSizes: Record<string, number>; drawersOpenQueue: string[]; onActiveDrawerChange: (newDrawerId: string | null, { initiatedByUserAction }?: OnChangeParams) => void; onActiveDrawerResize: ({ id, size }: { id: string; size: number; }) => void; onActiveGlobalDrawersChange: (drawerId: string, { initiatedByUserAction }?: Partial<OnChangeParams>) => void; }; export {}; //# sourceMappingURL=use-drawers.d.ts.map