UNPKG

@gfazioli/mantine-split-pane

Version:

A Mantine 9 React component for resizable split pane layouts with 7 resizer variants, context-based prop inheritance, responsive orientation, and dynamic pane generation.

14 lines (13 loc) 757 B
import type { ResponsiveValue } from '../types'; /** * Resolves a `ResponsiveValue<T>` to its concrete value for the current viewport. * If `value` is a plain scalar, it is returned directly. If it is a Mantine * breakpoint map (e.g. `{ base: '100%', md: '50%' }`), the value matching the * current viewport width is selected via `useMatches`. * * @param value - A static value or a Mantine breakpoint map * @param defaultValue - Fallback returned when `value` is `undefined` * @returns The resolved scalar value for the current viewport */ export declare function useResponsiveValue<T>(value: ResponsiveValue<T> | undefined, defaultValue: T): T; export declare function useResponsiveValue<T>(value: ResponsiveValue<T> | undefined): T | undefined;