From e1cc2de22fc703d94e1151beb9526d8cbe0e49c1 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 24 May 2022 16:05:03 +0200
Subject: chore(toolbar): change icons to close button when activated

---
 src/components/organisms/toolbar/search.tsx | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

(limited to 'src/components/organisms/toolbar/search.tsx')

diff --git a/src/components/organisms/toolbar/search.tsx b/src/components/organisms/toolbar/search.tsx
index 5695348..dc71c49 100644
--- a/src/components/organisms/toolbar/search.tsx
+++ b/src/components/organisms/toolbar/search.tsx
@@ -1,6 +1,6 @@
 import Checkbox, { type CheckboxProps } from '@components/atoms/forms/checkbox';
-import Label from '@components/atoms/forms/label';
 import MagnifyingGlass from '@components/atoms/icons/magnifying-glass';
+import FlippingLabel from '@components/molecules/forms/flipping-label';
 import { forwardRef, ForwardRefRenderFunction } from 'react';
 import { useIntl } from 'react-intl';
 import SearchModal, { type SearchModalProps } from '../modals/search-modal';
@@ -52,13 +52,14 @@ const Search: ForwardRefRenderFunction<HTMLDivElement, SearchProps> = (
         setValue={setIsActive}
         className={`${sharedStyles.checkbox} ${searchStyles.checkbox}`}
       />
-      <Label
+      <FlippingLabel
+        className={sharedStyles.label}
         htmlFor="search-button"
         aria-label={label}
-        className={`${sharedStyles.label} ${searchStyles.label}`}
+        isActive={isActive}
       >
         <MagnifyingGlass />
-      </Label>
+      </FlippingLabel>
       <SearchModal
         searchPage={searchPage}
         className={`${sharedStyles.modal} ${searchStyles.modal} ${className}`}
-- 
cgit v1.2.3

