-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-1.0.0' of github.com:tekdi/teachers-app into re…
…lease-1.0.0
- Loading branch information
Showing
33 changed files
with
1,127 additions
and
611 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react'; | ||
import { FormControl, InputLabel, Select, MenuItem, SelectChangeEvent } from '@mui/material'; | ||
|
||
interface FilterSelectProps { | ||
menuItems: { value: string; label: string }[]; | ||
selectedOption: string; | ||
handleFilterChange: (event: SelectChangeEvent) => void; | ||
label: string; | ||
sx?: object; | ||
} | ||
|
||
const FilterSelect: React.FC<FilterSelectProps> = ({ | ||
menuItems, | ||
selectedOption, | ||
handleFilterChange, | ||
label, | ||
sx = {} | ||
}) => { | ||
return ( | ||
<FormControl sx={{ minWidth: 200, marginLeft: "20px", backgroundColor: "#F0F0F0", ...sx }} variant="outlined" margin="normal"> | ||
<InputLabel id="filter-label">{label}</InputLabel> | ||
<Select | ||
labelId="filter-label" | ||
value={selectedOption} | ||
onChange={handleFilterChange} | ||
label={label} | ||
sx={{height:"50px"}} | ||
|
||
> | ||
{menuItems.map((item) => ( | ||
<MenuItem key={item.value} value={item.value}> | ||
{item.label} | ||
</MenuItem> | ||
))} | ||
</Select> | ||
</FormControl> | ||
); | ||
}; | ||
|
||
export default FilterSelect; |
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
Oops, something went wrong.