diff --git a/src/partials/Sidebar.tsx b/src/partials/Sidebar.tsx index ea98623..58bc462 100644 --- a/src/partials/Sidebar.tsx +++ b/src/partials/Sidebar.tsx @@ -2,6 +2,8 @@ import * as React from 'react'; import { Link } from 'react-router-dom'; import { FiSearch, FiX } from 'react-icons/fi'; import clsx from 'clsx'; +import { Input } from '../dashkit/Input'; +import { IconButton } from '../dashkit/IconButton'; export interface SidebarLink { to: string; @@ -53,27 +55,28 @@ export function Sidebar({ <> {searchable && (
-
- - setQuery(e.target.value)} - placeholder="Filter components..." - aria-label="Filter documentation links" - className="w-full h-8 pl-8 pr-7 text-xs bg-input-bg text-input-fg border border-input-border ds-rounded-sm outline-none transition-colors focus:border-input-focus focus:ring-2 focus:ring-input-focus/20 placeholder:text-muted-foreground" - /> - {query && ( - - )} -
+ setQuery(e.target.value)} + placeholder="Filter components..." + aria-label="Filter documentation links" + leftIcon={} + rightIcon={ + query ? ( + setQuery('')} + aria-label="Clear filter" + className="pointer-events-auto size-5 -mr-1" + icon={} + /> + ) : undefined + } + />
)}