Pricing shows no plans, prices or free trial until decided. Docs search and articles without pages are shown but not linked. Disables the agent file that next dev generates. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014SdXCbrN5PtGExkpvMaMHx
22 lines
754 B
TypeScript
22 lines
754 B
TypeScript
import { Icon } from '../ui/Icon.tsx';
|
|
import { Kbd } from './Kbd.tsx';
|
|
|
|
type Props = {
|
|
/** The accessible name. The placeholder is not a label. */
|
|
label: string;
|
|
shortcut?: string;
|
|
placeholder?: string;
|
|
disabled?: boolean;
|
|
};
|
|
|
|
/** Pill search field with a shortcut hint. Used in the top bar, the command palette and the docs. */
|
|
export function SearchField({ label, shortcut, placeholder = 'Search or ask…', disabled = false }: Props) {
|
|
return (
|
|
<div className={`p-search${disabled ? ' p-search-disabled' : ''}`}>
|
|
<Icon name="search" size={16} />
|
|
<input type="search" aria-label={label} placeholder={placeholder} disabled={disabled} className="p-search-input" />
|
|
{shortcut && <Kbd>{shortcut}</Kbd>}
|
|
</div>
|
|
);
|
|
}
|