@douyinfe/semi-ui
Version:
A modern, comprehensive, flexible design system and UI library. Connect DesignOps & DevOps. Quickly build beautiful React apps. Maintained by Douyin-fe team.
34 lines (33 loc) • 1.15 kB
TypeScript
import React from 'react';
import { Locale } from '../locale/interface';
import { ResponsiveMap, BreakpointScreens, OnBreakpointScreensCallback, OnBreakpointChangeCallback, Breakpoint } from './responsiveTypes';
export interface ContextValue {
direction?: 'ltr' | 'rtl';
timeZone?: string | number;
locale?: Locale;
children?: React.ReactNode;
getPopupContainer?(): HTMLElement;
/**
* Enable responsive observing in ConfigProvider (for consumers to know capability)
*/
responsiveObserve?: boolean;
/**
* Custom responsive map configuration
*/
responsiveMap?: ResponsiveMap;
/**
* Subscribe to breakpoint changes
* @param callback Function to call when breakpoint changes
* @returns Unsubscribe function
*/
onBreakpoint?: {
(callback: OnBreakpointScreensCallback): () => void;
(breakpoints: Breakpoint[], callback: OnBreakpointChangeCallback): () => void;
};
/**
* Current breakpoint screens state (read-only)
*/
screens?: BreakpointScreens;
}
declare const ConfigContext: React.Context<ContextValue>;
export default ConfigContext;