UNPKG

react-fit

Version:

Fit a popover element on the screen.

14 lines (13 loc) 437 B
type SpacingKeys = 'bottom' | 'left' | 'right' | 'top'; type Spacing = number | { [key in SpacingKeys]: number; }; export type FitProps = { children: React.ReactElement; invertAxis?: boolean; invertSecondaryAxis?: boolean; mainAxis?: 'x' | 'y'; spacing?: number | Spacing; }; export default function Fit({ children, invertAxis, invertSecondaryAxis, mainAxis, spacing, }: FitProps): React.ReactElement; export {};