From 5c75a302c2203cb3ebf31233121026b4775662cf Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 8 Apr 2022 19:32:58 +0200
Subject: chore(icons): accept a classname as prop

---
 src/components/atoms/icons/plus-minus.tsx | 24 +++++-------------------
 1 file changed, 5 insertions(+), 19 deletions(-)

(limited to 'src/components/atoms/icons/plus-minus.tsx')

diff --git a/src/components/atoms/icons/plus-minus.tsx b/src/components/atoms/icons/plus-minus.tsx
index 1a6f7b0..78aa14a 100644
--- a/src/components/atoms/icons/plus-minus.tsx
+++ b/src/components/atoms/icons/plus-minus.tsx
@@ -3,17 +3,9 @@ import styles from './plus-minus.module.scss';
 
 type PlusMinusProps = {
   /**
-   * Adds additional classes.
+   * Set additional classnames to the icon.
    */
-  additionalClasses?: string;
-  /**
-   * An accessible name.
-   */
-  ariaLabel?: string;
-  /**
-   * Should be hidden for accessibility. Default: true.
-   */
-  ariaHidden?: boolean;
+  className?: string;
   /**
    * Which state should be displayed.
    */
@@ -25,19 +17,13 @@ type PlusMinusProps = {
  *
  * Render a plus or a minus icon.
  */
-const PlusMinus: FC<PlusMinusProps> = ({
-  additionalClasses,
-  ariaHidden = true,
-  ariaLabel,
-  state,
-}) => {
+const PlusMinus: FC<PlusMinusProps> = ({ className, state }) => {
   const stateClass = `icon--${state}`;
 
   return (
     <div
-      className={`${styles.icon} ${styles[stateClass]} ${additionalClasses}`}
-      aria-label={ariaLabel}
-      aria-hidden={ariaHidden}
+      className={`${styles.icon} ${styles[stateClass]} ${className}`}
+      aria-hidden={true}
     ></div>
   );
 };
-- 
cgit v1.2.3

