import React from 'react'; import type { ScaledSize } from 'react-native'; import type { Breakpoint, RangeBreakpoint, Style } from '../types'; /** * Breakpoints that are intended to be applied across * a `BreakpointContext` */ export interface ContextualBreakpoints { screenSize?: ScaledSize; xs: number; sm: number; md: number; lg: number; xl: number; } /** * Stores values to be be used as breakpoints in * `useBreakpoints` */ export declare const BreakpointContext: React.Context; /** * @param root0 * @param root0.children * @return A provider for contextual breakpoints * @example * ```tsx * * * Red when small * * * ``` */ export declare const BreakpointProvider: React.FC>; export interface UseBreakpointsOptions { /** * Styles that will be applied above the `xs` breakpoint * `min-width` defined in the `BreakpointContext`. * * Defaults to 0px. */ xsStyle?: S; /** * Styles that will be applied above the `sm` breakpoint * `min-width` defined in the `BreakpointContext`. * * Defaults to 600px. */ smStyle?: S; /** * Styles that will be applied above the `md` breakpoint * `min-width` defined in the `BreakpointContext`. * * Defaults to 960px. */ mdStyle?: S; /** * Styles that will be applied above the `lg` breakpoint * `min-width` defined in the `BreakpointContext`. * * Defaults to 1280px. */ lgStyle?: S; /** * Styles that will be applied above the `xl` breakpoint * `min-width` defined in the `BreakpointContext`. * * Defaults to 1920px. */ xlStyle?: S; } /** * Builds a set of `min-width` breakpoints using the size variables from the * `BreakpointContext`. * * @param options Styles to build breakpoints for * @return Breakpoints using sizes from the `BreakpointContext` */ export declare const useBreakpoints: (options: UseBreakpointsOptions) => Breakpoint