- add Search pill component with lucide icon and focus highlight - wire debounced search input to GET /run/:id?q= backend filter - backend filters run logs with LIKE %q% via TypeORM - add sectionHeadingRow layout for heading + search alignment - add i18n keys: runs.step_title, logs_search_placeholder
24 lines
594 B
TypeScript
24 lines
594 B
TypeScript
import { Search as SearchIcon } from 'lucide-react';
|
|
import styles from './Search.module.css';
|
|
|
|
export interface SearchProps {
|
|
value: string;
|
|
onChange: (value: string) => void;
|
|
placeholder?: string;
|
|
}
|
|
|
|
export function Search({ value, onChange, placeholder = 'Search…' }: SearchProps) {
|
|
return (
|
|
<div className={styles.root}>
|
|
<SearchIcon size={13} className={styles.icon} />
|
|
<input
|
|
className={styles.input}
|
|
type="text"
|
|
value={value}
|
|
onChange={(e) => onChange(e.target.value)}
|
|
placeholder={placeholder}
|
|
/>
|
|
</div>
|
|
);
|
|
}
|