UNPKG

@spaced-out/ui-design-system

Version:
45 lines 1.61 kB
import * as React from 'react'; type ClassNames = Readonly<{ tooltip?: string; title?: string; body?: string; }>; export declare const DELAY_MOTION_DURATION_TYPES: Readonly<{ none: "none"; fast: "fast"; normal: "normal"; slow: "slow"; slower: "slower"; slowest: "slowest"; }>; export type DelayMotionDurationType = (typeof DELAY_MOTION_DURATION_TYPES)[keyof typeof DELAY_MOTION_DURATION_TYPES]; export declare const ELEVATION_TYPES: Readonly<{ none: "none"; card: "card"; tooltip: "tooltip"; menu: "menu"; backdrop: "backdrop"; modal: "modal"; toast: "toast"; }>; export type ElevationType = (typeof ELEVATION_TYPES)[keyof typeof ELEVATION_TYPES]; export type PlacementType = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'right'; export interface BaseTooltipProps { classNames?: ClassNames; title?: string | React.ReactNode; body?: string | React.ReactNode; placement?: PlacementType; bodyMaxLines?: number; titleMaxLines?: number; delayMotionDuration?: DelayMotionDurationType; hidden?: boolean; elevation?: ElevationType; testId?: string; } export interface TooltipProps extends Omit<BaseTooltipProps, 'children'> { children: React.ReactNode; } export declare const getElevationValue: (elevation: string) => string; export declare const Tooltip: ({ classNames, children, title, body, placement, bodyMaxLines, titleMaxLines, delayMotionDuration, elevation, hidden, testId, }: TooltipProps) => React.JSX.Element; export {}; //# sourceMappingURL=Tooltip.d.ts.map