From 7a382fbf3e47e6b3a095a898e2e470b5e19ef0ee Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 19 Feb 2022 13:49:19 +0800 Subject: [PATCH] feat(react-components): [button] add plain and circle --- packages/react-components/src/button/button.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-components/src/button/button.tsx b/packages/react-components/src/button/button.tsx index 4d6760b..7958cea 100644 --- a/packages/react-components/src/button/button.tsx +++ b/packages/react-components/src/button/button.tsx @@ -16,9 +16,11 @@ export type ButtonTypes = typeof buttonTypes[number] export interface ButtonProps { children?: any - round?: boolean size?: ComponentSizes type?: ButtonTypes + plain?: boolean + round?: boolean + circle?: boolean onClick?: () => void } @@ -27,7 +29,9 @@ export function Button(props: ButtonProps) { // eslint-disable-next-line unicorn/explicit-length-check if (props.size) classNames.push(`el-button--${props.size}`) if (props.type) classNames.push(`el-button--${props.type}`) + if (props.plain) classNames.push('is-plain') if (props.round) classNames.push('is-round') + if (props.circle) classNames.push('is-circle') return (