From d75b9a1e150ab211c1052fb49bede9bd16320aca Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Sat, 7 Oct 2023 18:44:14 +0200
Subject: feat(components): add a generic Flip component

The flipping animation is used at several places so it makes sense to
use a single component to handle the animation. It will avoid styles
duplication.
---
 src/components/organisms/toolbar/search.tsx | 7 +++----
 1 file changed, 3 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 a09bdae..6a33aff 100644
--- a/src/components/organisms/toolbar/search.tsx
+++ b/src/components/organisms/toolbar/search.tsx
@@ -62,13 +62,12 @@ const SearchWithRef: ForwardRefRenderFunction<HTMLDivElement, SearchProps> = (
         value="open"
       />
       <FlippingLabel
-        aria-label={label}
         className={sharedStyles.label}
         htmlFor="search-button"
+        icon={<Icon aria-hidden={true} shape="magnifying-glass" size="lg" />}
         isActive={isActive}
-      >
-        <Icon aria-hidden={true} shape="magnifying-glass" size="lg" />
-      </FlippingLabel>
+        label={label}
+      />
       <SearchModal
         className={`${sharedStyles.modal} ${searchStyles.modal} ${className}`}
         ref={searchInputRef}
-- 
cgit v1.2.3

