UNPKG

@clubmed/trident-ui

Version:

Shared ClubMed React UI components

23 lines (22 loc) 658 B
import { type FunctionComponent, type PropsWithChildren } from 'react'; declare const QUERIES: { MOBILE: string; TABLET: string; DESKTOP: string; }; type Devices = Lowercase<keyof typeof QUERIES>; type Direction = 'ltr' | 'rtl'; interface Props { device: Devices; direction?: Direction; } export interface DeviceContext { desktop: boolean; mobile: boolean; tablet: boolean; direction: Direction; } export declare const DeviceProvider: FunctionComponent<PropsWithChildren<Props>>; export declare function useDevice(device: Devices): boolean; export declare function useDevice(direction: 'direction'): Direction; export {};