UNPKG

choerodon-ui

Version:

An enterprise-class UI design language and React-based implementation

41 lines (40 loc) 1.35 kB
/// <reference types="lodash" /> import { PureComponent, ReactNode } from 'react'; import { Breakpoint } from './enum'; export declare type BreakpointMap = { [Breakpoint.xxl]?: any; [Breakpoint.xl]?: any; [Breakpoint.lg]?: any; [Breakpoint.md]?: any; [Breakpoint.sm]?: any; [Breakpoint.xs]?: any; }; export declare function isBreakPointMap(item: any): item is BreakpointMap; export declare function hasBreakPointMap(items: any[]): boolean; export declare type ChildrenFunction = (items: any[], disabled: boolean) => ReactNode; export interface ResponsiveProps { disabled?: boolean; items?: (any | BreakpointMap)[]; children?: ReactNode | ChildrenFunction; onChange?: (items: any[]) => void; } export interface ResponsiveState { breakpoints: BreakpointMap; } export default class Responsive extends PureComponent<ResponsiveProps, ResponsiveState> { static displayName: string; state: { breakpoints: {}; }; handlers: Map<any, any>; isDisabled(props: any): boolean; componentDidMount(): void; componentDidUpdate(prevProps: any): void; componentWillUnmount(): void; fireUpdate: import("lodash").DebouncedFunc<() => void>; register(): void; unregister(): void; processValue(value: any): any; getValues(): any[]; render(): {} | null | undefined; }