-
Notifications
You must be signed in to change notification settings - Fork 155
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 #493 from Saksham2k3s/add-canteen-rating
Added rating for canteen
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import * as React from 'react'; | ||
import { useContext } from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import Rating from '@mui/material/Rating'; | ||
import Typography from '@mui/material/Typography'; | ||
import { ThemeContext } from '../themeContext'; | ||
|
||
export default function BasicRating() { | ||
const [value, setValue] = React.useState(2); | ||
const { theme, toggleTheme } = useContext(ThemeContext); | ||
|
||
return ( | ||
<Box | ||
sx={{ | ||
'& > legend': { mt: 2 }, | ||
}} | ||
> | ||
<h2 className="text-lg font-bold mb-4 text-white text-start dark:text-black">Rate Canteen</h2> | ||
<Rating | ||
name="simple-controlled" | ||
value={value} | ||
onChange={(event, newValue) => { | ||
setValue(newValue); | ||
}} | ||
size='large' | ||
/> | ||
</Box> | ||
); | ||
} |
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