@navinc/base-react-components
Version:
Nav's Pattern Library
44 lines (43 loc) • 1.6 kB
TypeScript
import { ReactNode } from 'react';
import { Property } from 'csstype';
declare const contentHeightVariations: {
readonly dynamic: "max-height: calc(100vh - 160px);";
readonly full: "max-height: calc(100vh - 65px);";
};
type HeightVariation = keyof typeof contentHeightVariations;
type Variation = 'blue' | 'default';
type CloseHandler = () => void;
type InternalGroupedConfig = {
mobileFullPage?: boolean;
orientBottom?: boolean;
title?: ReactNode;
content?: ReactNode;
contentProps?: Record<string, unknown>;
heightVariation?: HeightVariation;
width?: Property.Width;
};
type InfoDrawerConfig = Partial<InternalGroupedConfig> & {
isOpen?: boolean;
};
export declare const InfoDrawerProvider: ({ children }: {
children: any;
}) => JSX.Element;
export declare const useInfoDrawer: ({ onClose }?: {
onClose?: CloseHandler | undefined;
}) => {
mobileFullPage: boolean | undefined;
orientBottom: boolean | undefined;
content: ReactNode;
contentProps: Record<string, unknown> | undefined;
title: ReactNode;
isOpen: boolean;
setInfoDrawer: (config: InfoDrawerConfig) => void;
heightVariation: "dynamic" | "full" | undefined;
width: Property.Width<0 | (string & {})> | undefined;
};
export declare const InfoDrawer: import("styled-components").StyledComponent<({ variation, heightVariation, className, }: {
variation?: Variation | undefined;
heightVariation?: "dynamic" | "full" | undefined;
className?: string | undefined;
}) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
export {};