UNPKG

@teamsparta/stack-core

Version:
28 lines (25 loc) 1.06 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import * as react from 'react'; import { Breakpoint } from './types.mjs'; /** * @description Breakpoint를 주입받기 위한 Context입니다. * mobile, tablet, desktop 외 다른 키를 추가할 수 있습니다. */ type BreakpointContextValue = Partial<Record<Breakpoint, number>>; /** * @description BreakpointContext를 생성하는 Provider와 useContext를 반환합니다. * 디자인 시스템에서 Breakpoint를 주입받기 위해 사용합니다. */ declare const /** * @description BreakpointContext를 생성하는 Provider입니다. * @example <StackBreakpointProvider mobile={0} tablet={820} desktop={1024}> */ StackBreakpointProvider: { (props: Partial<Record<Breakpoint, number>> & { children: react.ReactNode; }): react_jsx_runtime.JSX.Element; displayName: string; }; declare const useBreakpointContext: (consumerName: string) => Partial<Record<Breakpoint, number>>; export { type BreakpointContextValue, StackBreakpointProvider, useBreakpointContext };