Skip to content

Commit 06ff70a

Browse files
m-hulbertclaude
andcommitted
fixup! fix(nav): polish sidebar and layout alignment
Use shadcn Input component on examples search bar for parity with header search styling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1f7a0df commit 06ff70a

1 file changed

Lines changed: 16 additions & 11 deletions

File tree

src/components/Examples/ExamplesFilter.tsx

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { ChangeEvent, Dispatch, SetStateAction, useCallback, useEffect, useMemo, useRef, useState } from 'react';
22
import ReactDOM from 'react-dom';
33
import Icon from '@ably/ui/core/Icon';
4+
import { Input } from 'src/components/ui/Input';
45
import { products } from '../../data/examples';
56
import Button from '@ably/ui/core/Button';
67
import cn from '@ably/ui/core/utils/cn';
@@ -111,18 +112,22 @@ const ExamplesFilter = ({
111112

112113
return (
113114
<>
114-
<div className="h-[2.125rem] sm:h-[1.875rem] w-5 absolute left-2 top-1 flex items-center justify-center select-none cursor-default">
115-
<Icon name={'icon-gui-magnifying-glass-outline'} size="1rem" />
115+
<div className="relative w-full">
116+
<Icon
117+
name="icon-gui-magnifying-glass-outline"
118+
size="16px"
119+
additionalCSS="absolute left-3 top-1/2 -translate-y-1/2 z-10 text-neutral-600 dark:text-neutral-700 pointer-events-none"
120+
/>
121+
<Input
122+
type="search"
123+
className="rounded bg-neutral-100 dark:bg-neutral-1200 pl-9 w-full h-10 sm:h-[2.125rem]"
124+
placeholder="Find an example..."
125+
autoComplete="off"
126+
aria-label="Search examples"
127+
role="searchbox"
128+
onChange={(e) => handleSearch(e)}
129+
/>
116130
</div>
117-
<input
118-
type="search"
119-
className="ui-input pl-9 w-full h-10 sm:h-[2.125rem] ui-text-p3"
120-
placeholder="Find an example"
121-
autoComplete="off"
122-
aria-label="Search examples"
123-
role="searchbox"
124-
onChange={(e) => handleSearch(e)}
125-
/>
126131
<Button
127132
className="flex sm:hidden mt-4 w-full"
128133
variant="secondary"

0 commit comments

Comments
 (0)