-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Sun-Mountain/21-tourny-material-filters
21 tourny material filters
- Loading branch information
Showing
15 changed files
with
271 additions
and
141 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { ChangeEvent } from 'react'; | ||
import Radio from '@mui/material/Radio'; | ||
import RadioGroup from '@mui/material/RadioGroup'; | ||
import FormControlLabel from '@mui/material/FormControlLabel'; | ||
import FormControl from '@mui/material/FormControl'; | ||
|
||
import { RadioGroupInterface } from '@/interfaces/Components'; | ||
|
||
export default function RadioButtonsGroup({ | ||
formLabel, | ||
options, | ||
setValue, | ||
value | ||
}: RadioGroupInterface) { | ||
|
||
const handleChange = (event: ChangeEvent<HTMLInputElement>) => { | ||
setValue((event.target as HTMLInputElement).value); | ||
}; | ||
|
||
return ( | ||
<div className='radio-group-container'> | ||
<FormControl> | ||
<strong id="radio-buttons-group-tournament-label">{formLabel}</strong> | ||
<RadioGroup | ||
aria-labelledby="demo-radio-buttons-group-label" | ||
value={value} | ||
onChange={handleChange} | ||
name="radio-buttons-group" | ||
> | ||
{options.map(option => ( | ||
<FormControlLabel | ||
key={option} | ||
value={option} | ||
control={<Radio />} | ||
label={option} | ||
/> | ||
))} | ||
</RadioGroup> | ||
</FormControl> | ||
</div> | ||
); | ||
} |
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,37 @@ | ||
import { Dispatch, SetStateAction } from 'react'; | ||
import { UniqueFilter } from './Filters'; | ||
|
||
export interface DailyTabs { | ||
allBaseFilters: number[]; | ||
showOnly: Array<number[]>; | ||
dateList: UniqueFilter; | ||
hideMaterialReq: boolean; | ||
hideSoldOut: boolean; | ||
materialsRequired: number[]; | ||
soldOutEvents: number[]; | ||
tournamentFilter: string; | ||
tourneyList: number[]; | ||
earlyStartTime: string; | ||
lateStartTime: string; | ||
startTimes: UniqueFilter; | ||
} | ||
|
||
export interface RadioGroupInterface { | ||
formLabel: string; | ||
options: string[]; | ||
setValue: Dispatch<SetStateAction<string>>; | ||
value?: string; | ||
} | ||
|
||
export interface SwitchInterface { | ||
switchLabel: string; | ||
hide: boolean; | ||
setHide: Dispatch<SetStateAction<boolean>>; | ||
} | ||
|
||
export interface TournamentSwitches { | ||
hideTourney: boolean; | ||
setHideTourney: Dispatch<SetStateAction<boolean>>; | ||
tourneyOnly: boolean; | ||
setTourneyOnly: Dispatch<SetStateAction<boolean>>; | ||
} |
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,7 @@ | ||
import { FilterTypes } from "@/interfaces/Filters" | ||
import { NewEvent } from "@/interfaces/Events" | ||
|
||
export interface Data { | ||
eventData: Array<NewEvent>, | ||
filters: FilterTypes | ||
} |
Oops, something went wrong.
60701f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
gen-con-cal – ./
gen-con-cal-sun-mountain.vercel.app
gen-con-cal-git-main-sun-mountain.vercel.app
gen-con-cal.vercel.app