@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.
47 lines (46 loc) • 1.53 kB
TypeScript
import React, { CSSProperties } from 'react';
import PropTypes from 'prop-types';
import { ContextType } from './layout-context';
export interface ResponsiveMap {
xs: string;
sm: string;
md: string;
lg: string;
xl: string;
xxl: string;
}
export interface SiderProps {
prefixCls?: string;
style?: CSSProperties;
className?: string;
children?: React.ReactNode;
breakpoint?: Array<keyof ResponsiveMap>;
onBreakpoint?: (screen: keyof ResponsiveMap, match: boolean) => void;
'aria-label'?: React.AriaAttributes['aria-label'];
'role'?: React.AriaRole;
}
declare class Sider extends React.PureComponent<SiderProps> {
static propTypes: {
prefixCls: PropTypes.Requireable<string>;
style: PropTypes.Requireable<object>;
className: PropTypes.Requireable<string>;
breakpoint: PropTypes.Requireable<string[]>;
onBreakpoint: PropTypes.Requireable<(...args: any[]) => any>;
'aria-label': PropTypes.Requireable<string>;
role: PropTypes.Requireable<string>;
};
static defaultProps: {
prefixCls: string;
};
static contextType: React.Context<ContextType>;
static elementType: string;
unRegisters: Array<() => void>;
context: ContextType;
uniqueId: string;
constructor(props: SiderProps);
componentDidMount(): void;
componentWillUnmount(): void;
responsiveHandler(screen: keyof ResponsiveMap, matches: boolean): void;
render(): React.JSX.Element;
}
export default Sider;