diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-01 19:03:42 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-01 22:58:18 +0200 |
| commit | d177e0c7c61845b516d4a361a21739bb6486b9b5 (patch) | |
| tree | 3905aab133889d5d59f8116fbcf301930b858887 /src/components/atoms/buttons/button.tsx | |
| parent | 163f9dc0fe436b708de4e59999e87005c6685a0f (diff) | |
chore: add a back to top component
Diffstat (limited to 'src/components/atoms/buttons/button.tsx')
| -rw-r--r-- | src/components/atoms/buttons/button.tsx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/components/atoms/buttons/button.tsx b/src/components/atoms/buttons/button.tsx index 420ee74..08b8d67 100644 --- a/src/components/atoms/buttons/button.tsx +++ b/src/components/atoms/buttons/button.tsx @@ -19,6 +19,10 @@ export type ButtonProps = { */ onClick?: MouseEventHandler<HTMLButtonElement>; /** + * Button shape. Default: rectangle. + */ + shape?: 'rectangle' | 'square'; + /** * Button type attribute. Default: button. */ type?: 'button' | 'reset' | 'submit'; @@ -33,16 +37,18 @@ const Button: FC<ButtonProps> = ({ children, disabled = false, kind = 'secondary', + shape = 'rectangle', type = 'button', ...props }) => { const kindClass = styles[`btn--${kind}`]; + const shapeClass = styles[`btn--${shape}`]; return ( <button type={type} disabled={disabled} - className={`${styles.btn} ${kindClass}`} + className={`${styles.btn} ${kindClass} ${shapeClass}`} {...props} > {children} |
