import React from 'react'; export interface StyledButtonProps { children: React.ReactNode; border?: boolean; raised?: boolean; color?: string; } export interface Props { children: React.ReactNode; /** * 不可用状态 */ disabled?: boolean; /** * 带边框按钮 */ border?: boolean; /** * 实心按钮 */ raised?: boolean; /** * 自定义按钮颜色 */ color?: string; /** * 点击按钮时的回调函数 */ onClick?: (event: React.MouseEvent) => void; /** * 鼠标按下时的回调函数 */ onMouseDown?: (event: React.MouseEvent) => void; /** * 松开鼠标按键时的回调函数 */ onMouseUp?: (event: React.MouseEvent) => void; /** * 获取DOM元素 */ innerRef?: (instance: HTMLButtonElement) => void | React.RefObject; /** * 宽度自适应 */ autoWidth?: boolean; /** * 自定义样式 */ style?: React.CSSProperties; /** * 自定义类名 */ className?: string; /** * 按钮类型 */ type?: string; /** * 自定义渲染的组件 */ comp?: React.ReactNode; } declare const Button: { new (props: Readonly): { rippleElement?: import("@sinoui/ripple/build").RippleElement; componentDidMount(): void; componentDidUpdate(prevProps: Props): void; componentWillUnmount(): void; createRippleElement(): void; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void; forceUpdate(callBack?: () => void): void; readonly props: Readonly & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly<{}>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; }; new (props: Props, context?: any): { rippleElement?: import("@sinoui/ripple/build").RippleElement; componentDidMount(): void; componentDidUpdate(prevProps: Props): void; componentWillUnmount(): void; createRippleElement(): void; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void; forceUpdate(callBack?: () => void): void; readonly props: Readonly & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; shouldComponentUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): boolean; componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void; getSnapshotBeforeUpdate?(prevProps: Readonly, prevState: Readonly<{}>): any; componentWillMount?(): void; UNSAFE_componentWillMount?(): void; componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; UNSAFE_componentWillReceiveProps?(nextProps: Readonly, nextContext: any): void; componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; UNSAFE_componentWillUpdate?(nextProps: Readonly, nextState: Readonly<{}>, nextContext: any): void; }; displayName: string; sinouiName: any; contextType?: React.Context; }; export default Button;