From 51889773b12c576dc199fc84d0188f822ac7baae Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Wed, 6 Apr 2022 19:17:15 +0200
Subject: chore: add a HelpButton component

I also added a new shape to the button base.
---
 src/components/atoms/buttons/button.tsx | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

(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 08b8d67..ae4c894 100644
--- a/src/components/atoms/buttons/button.tsx
+++ b/src/components/atoms/buttons/button.tsx
@@ -2,10 +2,14 @@ import { FC, MouseEventHandler } from 'react';
 import styles from './buttons.module.scss';
 
 export type ButtonProps = {
+  /**
+   * Add additional classes to the button wrapper.
+   */
+  additionalClasses?: string;
   /**
    * Button accessible label.
    */
-  'aria-label'?: string;
+  ariaLabel?: string;
   /**
    * Button state. Default: false.
    */
@@ -21,7 +25,7 @@ export type ButtonProps = {
   /**
    * Button shape. Default: rectangle.
    */
-  shape?: 'rectangle' | 'square';
+  shape?: 'circle' | 'rectangle' | 'square';
   /**
    * Button type attribute. Default: button.
    */
@@ -34,6 +38,8 @@ export type ButtonProps = {
  * Use a button as call to action.
  */
 const Button: FC<ButtonProps> = ({
+  additionalClasses,
+  ariaLabel,
   children,
   disabled = false,
   kind = 'secondary',
@@ -48,7 +54,8 @@ const Button: FC<ButtonProps> = ({
     <button
       type={type}
       disabled={disabled}
-      className={`${styles.btn} ${kindClass} ${shapeClass}`}
+      className={`${styles.btn} ${kindClass} ${shapeClass} ${additionalClasses}`}
+      aria-label={ariaLabel}
       {...props}
     >
       {children}
-- 
cgit v1.2.3

