From d177e0c7c61845b516d4a361a21739bb6486b9b5 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 1 Apr 2022 19:03:42 +0200 Subject: chore: add a back to top component --- src/components/atoms/buttons/button.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/components/atoms/buttons/button.tsx') 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 @@ -18,6 +18,10 @@ export type ButtonProps = { * A callback function to handle click. */ onClick?: MouseEventHandler; + /** + * Button shape. Default: rectangle. + */ + shape?: 'rectangle' | 'square'; /** * Button type attribute. Default: button. */ @@ -33,16 +37,18 @@ const Button: FC = ({ children, disabled = false, kind = 'secondary', + shape = 'rectangle', type = 'button', ...props }) => { const kindClass = styles[`btn--${kind}`]; + const shapeClass = styles[`btn--${shape}`]; return (