UNPKG

@navinc/base-react-components

Version:
49 lines (48 loc) 1.87 kB
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);"; }; declare type HeightVariation = keyof typeof contentHeightVariations; declare type Variation = 'blue' | 'default'; declare type CloseHandler = () => void; declare type InternalGroupedConfig = { mobileFullPage?: boolean; orientBottom?: boolean; title?: ReactNode; content?: ReactNode; contentProps?: Record<string, unknown>; heightVariation?: HeightVariation; width?: Property.Width; }; declare 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: ({ 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;