UNPKG

leo-design-ui

Version:

React Design Library

20 lines (19 loc) 856 B
import React from "react"; export type ButtonType = 'default' | 'primary' | 'danger' | 'warning' | 'success' | 'link'; export type ButtonSize = 'sm' | 'lg'; interface BaseButtonProps { /**设置 Button 的类型 */ btnType?: ButtonType; /**设置 Button 的尺寸 */ size?: ButtonSize; /**设置 Button 的禁用 */ disabled?: boolean; href?: string; className?: string; children: React.ReactNode; } type NativeButtonType = BaseButtonProps & React.ButtonHTMLAttributes<HTMLElement>; type AnchorButtonProps = BaseButtonProps & React.AnchorHTMLAttributes<HTMLElement>; export type ButtonProps = Partial<NativeButtonType & AnchorButtonProps>; export declare const Button: ({ btnType, size, disabled, href, children, className, ...restProps }: ButtonProps) => import("react/jsx-runtime").JSX.Element; export default Button;