@navinc/base-react-components
Version:
Nav's Pattern Library
42 lines (41 loc) • 1.55 kB
TypeScript
import { ReactNode } from 'react';
declare const contentHeightVariations: {
readonly dynamic: "max-height: calc(100vh - 160px);";
readonly full: "max-height: calc(100vh - 65px);";
};
declare type HeightVariation = keyof typeof contentHeightVariations;
declare type Variation = 'blue' | 'default';
declare type CloseHandler = () => void;
declare type InfoDrawerConfig = {
isOpen?: boolean;
mobileFullPage?: boolean;
orientBottom?: boolean;
title?: ReactNode;
content?: ReactNode;
heightVariation?: HeightVariation;
};
export declare const InfoDrawerProvider: ({ children }: {
children: any;
}) => JSX.Element;
export declare const useInfoDrawer: ({ onClose }?: {
onClose?: CloseHandler | undefined;
}) => {
mobileFullPage: boolean;
orientBottom: boolean;
content: ReactNode;
title: ReactNode;
isOpen: boolean;
setInfoDrawer: (config: InfoDrawerConfig) => void;
heightVariation: "dynamic" | "full" | undefined;
};
export declare const InfoDrawer: ({ variation, heightVariation, className, }: {
variation?: Variation | undefined;
heightVariation?: "dynamic" | "full" | undefined;
className?: string | undefined;
}) => JSX.Element;
declare const _default: 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 default _default;