ant-design-vue/types/button/button.d.ts

77 lines
1.8 KiB
TypeScript
Raw Normal View History

// Project: https://github.com/vueComponent/ant-design-vue
// Definitions by: akki-jat <https://github.com/akki-jat>
// Definitions: https://github.com/vueComponent/ant-design-vue/types
2019-01-12 03:33:27 +00:00
import { ButtonGroup } from './button-group';
2020-08-17 10:41:55 +00:00
import { VNodeChild } from 'vue';
2020-08-31 06:59:56 +00:00
import { AntdComponent, AntdProps } from '../component';
export declare class Button extends AntdComponent {
static Group: typeof ButtonGroup;
2020-08-31 06:59:56 +00:00
$props: AntdProps & {
/**
* can be set to primary ghost dashed danger(added in 2.7) or omitted (meaning default)
* @default 'default'
* @type string
*/
2020-08-17 10:41:55 +00:00
type?: 'primary' | 'danger' | 'dashed' | 'ghost' | 'default';
/**
* set the original html type of button
* @default 'button'
* @type string
*/
2020-08-17 10:41:55 +00:00
htmlType?: 'button' | 'submit' | 'reset' | 'menu';
/**
* set the icon of button
* @type string
*/
2020-08-17 10:41:55 +00:00
icon?: VNodeChild | JSX.Element;
/**
* can be set to circle or circle-outline or omitted
* @type string
*/
2020-08-17 10:41:55 +00:00
shape?: 'circle' | 'circle-outline';
/**
* can be set to small large or omitted
* @default 'default'
* @type string
*/
2020-08-17 10:41:55 +00:00
size?: 'small' | 'large' | 'default';
/**
* set the loading status of button
* @default false
* @type boolean | { delay: number }
*/
2020-08-17 10:41:55 +00:00
loading?: boolean | { delay: number };
/**
* disabled state of button
* @default false
* @type boolean
*/
2020-08-17 10:41:55 +00:00
disabled?: boolean;
/**
* make background transparent and invert text and border colors, added in 2.7
* @default false
* @type boolean
*/
2020-08-17 10:41:55 +00:00
ghost?: boolean;
/**
* option to fit button width to its parent width
* @default false
* @type boolean
*/
2020-08-17 10:41:55 +00:00
block?: boolean;
onClick?: (e?: Event) => void;
};
}