@opensig/opendesign
Version:
75 lines (74 loc) • 1.66 kB
TypeScript
import { ExtractPropTypes, PropType, Component } from 'vue';
import { RoundT, ColorT, VariantT, SizeT } from '../_utils/types';
export type ButtonColorT = ColorT | 'brand';
export declare const buttonProps: {
/**
* @zh-CN 颜色类型
* @en-US Color type
* @default 'normal'
*/
color: {
type: PropType<ButtonColorT>;
default: string;
};
/**
* @zh-CN 按钮类型
* @en-US Button type
* @default 'outline'
*/
variant: {
type: PropType<VariantT>;
};
/**
* @zh-CN 按钮尺寸
* @en-US Button size
*/
size: {
type: PropType<SizeT>;
};
/**
* @zh-CN 圆角值
* @en-US Border radius
*/
round: {
type: PropType<RoundT>;
};
/**
* @zh-CN 是否为加载状态
* @en-US Loading state
*/
loading: {
type: BooleanConstructor;
};
/**
* @zh-CN 是否禁用
* @en-US Disabled state
*/
disabled: {
type: BooleanConstructor;
};
/**
* @zh-CN 跳转链接,如果设置了此属性,则按钮会以 a 标签渲染
* @en-US Link to navigate, if set, the button will render as an anchor tag
*/
href: {
type: StringConstructor;
};
/**
* @zh-CN 前缀图标
* @en-US Prefix icon
*/
icon: {
type: PropType<Component>;
};
/**
* @zh-CN 自定义按钮渲染标签
* @en-US Custom button render tag
* @default 'button'
*/
tag: {
type: StringConstructor;
default: string;
};
};
export type ButtonPropsT = ExtractPropTypes<typeof buttonProps>;