UNPKG

dtd

Version:

根据数梦工场视觉规范打造的组件库,感谢react-components和ant design

60 lines (59 loc) 1.88 kB
import * as React from 'react'; import * as PropTypes from 'prop-types'; export declare type CollapseType = 'clickTrigger' | 'responsive'; export interface SiderProps { style?: React.CSSProperties; prefixCls?: string; className?: string; collapsible?: boolean; collapsed?: boolean; defaultCollapsed?: boolean; reverseArrow?: boolean; onCollapse?: (collapsed: boolean, type: CollapseType) => void; trigger?: React.ReactNode; width?: number | string; collapsedWidth?: number | string; breakpoint?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl'; } export interface SliderState { collapsed?: boolean; below: boolean; belowShow?: boolean; } export interface SliderContext { siderCollapsed: boolean; } export default class Sider extends React.Component<SiderProps, SliderState> { static __ANT_LAYOUT_SIDER: any; static defaultProps: { prefixCls: string; collapsible: boolean; defaultCollapsed: boolean; reverseArrow: boolean; width: number; collapsedWidth: number; style: {}; }; static childContextTypes: { siderCollapsed: PropTypes.Requireable<boolean>; collapsedWidth: PropTypes.Requireable<string | number>; }; static contextTypes: { siderHook: PropTypes.Requireable<object>; }; private mql; private uniqueId; constructor(props: SiderProps); getChildContext(): { siderCollapsed: boolean | undefined; collapsedWidth: string | number | undefined; }; componentWillReceiveProps(nextProps: SiderProps): void; componentDidMount(): void; componentWillUnmount(): void; responsiveHandler: (mql: MediaQueryList) => void; setCollapsed: (collapsed: boolean, type: CollapseType) => void; toggle: () => void; belowShowChange: () => void; render(): JSX.Element; }