antd/lib/button#ButtonType TypeScript Examples
The following examples show how to use
antd/lib/button#ButtonType.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 6 votes |
/**
* @kind ButtonType
* @required false
* @default `"primary"`
* @description 模态框确认按钮类型 ButtonType("link" | "default" | "primary" | "ghost" | "dashed" | "danger")
* @group basic
*/
@property()
okType: ButtonType;
Example #2
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 6 votes |
/**
* @kind `"default" | "primary" | "ghost" | "dashed" | "danger" | "link"`
* @required -
* @default `"primary"`
* @description 提交按钮的类型
*/
@property({
// Ensure `layout` is `FormLayout`.
converter: {
fromAttribute(value: string): string {
if (value && BUTTON_TYPES.includes(value)) {
return value;
}
return "primary";
},
toAttribute(value: string): string {
if (BUTTON_TYPES.includes(value)) {
return value;
}
},
},
})
submitType: ButtonType;
Example #3
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 6 votes |
/**
* @kind `"default" | "primary" | "ghost" | "dashed" | "danger" | "link"`
* @default `"link"`
* @description 取消按钮的类型
*/
@property({
// Ensure `layout` is `FormLayout`.
converter: {
fromAttribute(value: string): string {
if (value && BUTTON_TYPES.includes(value)) {
return value;
}
return "link";
},
toAttribute(value: string): string {
if (BUTTON_TYPES.includes(value)) {
return value;
}
},
},
})
cancelType: ButtonType;
Example #4
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 6 votes |
/**
* @kind `ButtonType`("link" | "default" | "primary" | "ghost" | "dashed" | "danger")
* @required false
* @default `"primary"`
* @description 模态框确认按钮类型
* @group advanced
*/
@property()
okType: ButtonType;
Example #5
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 5 votes |
/**
* @kind `ButtonType` (`"link" | "default" | "primary" | "ghost" | "dashed" | "danger" | "icon" | "text"`)
* @required false
* @default -
* @description 更多按钮的类型,参考 general-button 构件
*/
@property()
moreButtonType: ButtonType;
Example #6
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 5 votes |
/**
* @kind `"default" | "primary" | "ghost" | "dashed" | "danger" | "link"`
* @required false
* @default `"primary"`
* @description 确认按钮类型
* @group advanced
*/
@property({ attribute: false }) okType: ButtonType;
Example #7
Source File: index.tsx From next-basics with GNU General Public License v3.0 | 5 votes |
/**
* @kind ButtonType ("link" | "default" | "primary" | "ghost" | "dashed" | "danger")
* @required false
* @default -
* @description 确定按钮类型
* @group advanced
*/
@property() okType: ButtonType;