mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2024-11-10 09:39:15 +08:00
22 lines
773 B
TypeScript
22 lines
773 B
TypeScript
|
import { booleanType, someType, stringType, vNodeType } from '@v-c/utils'
|
||
|
import type { ExtractPropTypes } from 'vue'
|
||
|
import type { SizeType } from '../config-provider/context'
|
||
|
import type { ButtonHTMLType, ButtonShape, ButtonType } from './button-helper'
|
||
|
|
||
|
export const buttonProps = {
|
||
|
type: stringType<ButtonType>('default'),
|
||
|
icon: vNodeType(),
|
||
|
shape: stringType<ButtonShape>(),
|
||
|
size: someType<SizeType | 'default'>([String], 'default'),
|
||
|
disabled: booleanType(),
|
||
|
loading: someType<boolean | { delay?: number }>(),
|
||
|
prefixCls: stringType(),
|
||
|
rootClassName: stringType(),
|
||
|
ghost: booleanType(),
|
||
|
danger: booleanType(),
|
||
|
block: booleanType(),
|
||
|
htmlType: stringType<ButtonHTMLType>('button')
|
||
|
}
|
||
|
|
||
|
export type ButtonProps = ExtractPropTypes<typeof buttonProps>
|