tav-ui
Version:
45 lines (42 loc) • 1.28 kB
JavaScript
import { propTypes } from '../../../utils/propTypes2.mjs';
const tuple = (...args) => args;
const ButtonTypes = tuple("default", "primary", "ghost", "dashed", "link", "text");
const ButtonHTMLTypes = tuple("submit", "button", "reset");
const buttonProps = {
prefixCls: propTypes.string,
type: propTypes.oneOf(ButtonTypes),
htmlType: propTypes.oneOf(ButtonHTMLTypes).def("button"),
shape: {
type: String
},
size: {
type: String
},
loading: {
type: [Boolean, Object],
default: () => false
},
ghost: propTypes.looseBool,
block: propTypes.looseBool,
danger: propTypes.looseBool,
icon: propTypes.VNodeChild,
href: propTypes.string,
target: propTypes.string,
title: propTypes.string,
color: { type: String, validator: (v) => ["error", "warning", "success", ""].includes(v) },
disabled: { type: Boolean },
preIcon: { type: String },
preIconColor: { type: String },
postIcon: { type: String },
postIconColor: { type: String },
iconSize: { type: Number, default: 14 },
onClick: { type: Function, default: null },
permission: { type: String },
permissionCode: { type: Number },
usePermission: {
type: Object
},
ifShow: { type: Boolean, default: true }
};
export { buttonProps };
//# sourceMappingURL=types2.mjs.map