-
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 32633fa
Showing
11 changed files
with
111 additions
and
56 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,30 @@ | ||
import { FormControl, InputLabel, Select, MenuItem } from '@mui/material' | ||
import React from 'react' | ||
import { LabelObject } from 'types/searchCriterias' | ||
import useStyles from './style' | ||
|
||
type SimpleSelectProps = { | ||
label?: string | ||
value: string | ||
onChange: (value: string) => void | ||
options: LabelObject[] | ||
} | ||
|
||
const SimpleSelect = (props: SimpleSelectProps) => { | ||
const { label, value, onChange } = props | ||
const { classes } = useStyles() | ||
return ( | ||
<FormControl variant="outlined" className={classes.inputItem}> | ||
{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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { makeStyles } from 'tss-react/mui' | ||
|
||
const useStyles = makeStyles()(() => ({ | ||
inputItem: { | ||
margin: '1em', | ||
width: 'calc(100% - 2em)' | ||
} | ||
})) | ||
|
||
export default useStyles |
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