-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4669c0f
commit d79cd5b
Showing
10 changed files
with
103 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react' | ||
import { FormControl, InputLabel, Select, MenuItem } from '@mui/material' | ||
import { LabelObject } from 'types/searchCriterias' | ||
|
||
type SimpleSelectProps = { | ||
label?: string | ||
value: string | ||
onChange: (value: string) => void | ||
options: LabelObject[] | ||
} | ||
|
||
const SimpleSelect = (props: SimpleSelectProps) => { | ||
const { label, value, onChange } = props | ||
return ( | ||
<FormControl variant="outlined" style={{ width: '100%' }}> | ||
{label && <InputLabel>{label}</InputLabel>} | ||
<Select value={value} onChange={(event) => onChange(event.target.value)} variant="outlined" label={label}> | ||
{props.options.map((option) => ( | ||
<MenuItem key={option.id} value={option.id}> | ||
{option.label} | ||
</MenuItem> | ||
))} | ||
</Select> | ||
</FormControl> | ||
) | ||
} | ||
|
||
export default SimpleSelect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters