UNPKG

apphouse

Version:

Component library for React that uses observable state management and theme-able components.

51 lines (50 loc) 1.05 kB
import React from 'react'; export type HintPosition = 'top' | 'bottom' | 'left' | 'right'; export interface HintProps { /** * The hint text */ hint: string; /** * The children element that will display the hint */ children: React.ReactNode; /** * Position of the hint * @default 'top' */ position?: HintPosition; /** * Size of the hint * * @default 'medium' * @example * <Hint size="large" /> * <Hint size="medium" /> * <Hint size="small" /> * * @see https://apphouse.dev/docs/components/hint * */ size?: 'small' | 'medium' | 'large'; } /** * Hint component * * A fixed position hint that is displayed on the direction specified by the position prop * * Usage: * * ```sh * npm install apphouse * ``` * @example * ```tsx * import { Hint } from 'apphouse'; * * <Hint hint="Hint" position="top"> * <Text>Hover over me to see the hint</Text> * </Hint> * ``` */ export declare const Hint: React.FC<HintProps>;