aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/organisms/toolbar/search.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-07 18:44:14 +0200
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:14:41 +0100
commitd75b9a1e150ab211c1052fb49bede9bd16320aca (patch)
treee5bb221d2b8dc83151697fe646e9194f921b5807 /src/components/organisms/toolbar/search.tsx
parent12a03a9a72f7895d571dbaeeb245d92aa277a610 (diff)
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.
Diffstat (limited to 'src/components/organisms/toolbar/search.tsx')
-rw-r--r--src/components/organisms/toolbar/search.tsx7
1 files changed, 3 insertions, 4 deletions
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}