Files
linux-cloud-router/web/src/SearchField.tsx
T

17 lines
622 B
TypeScript

import Search from '@mui/icons-material/Search'
import { InputAdornment, TextField } from '@mui/material'
/** A small search box for a toolbar; onChange gets the text as typed. */
export default function SearchField(props: { value: string; onChange: (value: string) => void }) {
return (
<TextField
size="small"
placeholder="Search"
value={props.value}
onChange={(event) => props.onChange(event.target.value)}
sx={{ width: 220, flexShrink: 0 }}
slotProps={{ input: { startAdornment: <InputAdornment position="start"><Search fontSize="small" /></InputAdornment> } }}
/>
)
}