@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
61 lines • 2.17 kB
TypeScript
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;
expandedDrawerId?: string | null;
setExpandedDrawerId?: (value: string | null) => void;
};
export declare function useDrawers({
drawers,
activeDrawerId: controlledActiveDrawerId,
onDrawerChange,
onGlobalDrawerFocus,
onAddNewActiveDrawer,
expandedDrawerId,
setExpandedDrawerId,
__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: React.MutableRefObject<string[]>;
onActiveDrawerChange: (newDrawerId: string | null, {
initiatedByUserAction
}?: OnChangeParams) => void;
onActiveDrawerResize: ({
id,
size
}: {
id: string;
size: number;
}) => void;
onActiveGlobalDrawersChange: (drawerId: string, {
initiatedByUserAction
}?: Partial<OnChangeParams>) => void;
};
export {};