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/magnifying-glass.tsx | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

(limited to 'src/components/atoms/icons/magnifying-glass.tsx')

diff --git a/src/components/atoms/icons/magnifying-glass.tsx b/src/components/atoms/icons/magnifying-glass.tsx
index 547dd00..445ef10 100644
--- a/src/components/atoms/icons/magnifying-glass.tsx
+++ b/src/components/atoms/icons/magnifying-glass.tsx
@@ -1,17 +1,24 @@
-import { FC } from 'react';
+import { VFC } from 'react';
 import styles from './magnifying-glass.module.scss';
 
+export type MagnifyingGlassProps = {
+  /**
+   * Set additional classnames to the icon.
+   */
+  className?: string;
+};
+
 /**
  * MagnifyingGlass component
  *
  * Render a magnifying glass svg icon.
  */
-const MagnifyingGlass: FC = () => {
+const MagnifyingGlass: VFC<MagnifyingGlassProps> = ({ className = '' }) => {
   return (
     <svg
       viewBox="0 0 100 100"
       xmlns="http://www.w3.org/2000/svg"
-      className={styles.icon}
+      className={`${styles.icon} ${className}`}
     >
       <path
         className={styles['small-handle']}
-- 
cgit v1.2.3

