From 24d0b4c96c23d4e3b850acf34ea3f1be4f1ae9d7 Mon Sep 17 00:00:00 2001 From: krish Date: Wed, 7 Aug 2024 12:40:49 +0530 Subject: [PATCH] modal design review --- src/app/(dashboard)/review/page.tsx | 60 ++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 6 deletions(-) diff --git a/src/app/(dashboard)/review/page.tsx b/src/app/(dashboard)/review/page.tsx index e9c24ca..b92f6e0 100644 --- a/src/app/(dashboard)/review/page.tsx +++ b/src/app/(dashboard)/review/page.tsx @@ -4,7 +4,8 @@ import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; import Typography from "@mui/material/Typography"; import Modal from "@mui/material/Modal"; - +import Rating from '@mui/material/Rating'; +import StarIcon from '@mui/icons-material/Star'; const style = { position: "absolute" as "absolute", top: "50%", @@ -16,8 +17,23 @@ const style = { boxShadow: 24, p: 4, }; +const labels: { [index: string]: string } = { + 0.5: 'Useless', + 1: 'Useless+', + 1.5: 'Poor', + 2: 'Poor+', + 2.5: 'Ok', + 3: 'Ok+', + 3.5: 'Good', + 4: 'Good+', + 4.5: 'Excellent', + 5: 'Excellent+', +}; + const HomePage = () => { + const [value, setValue] = React.useState(2); + const [hover, setHover] = React.useState(-1); const [open, setOpen] = useState(false); const handleOpen = () => setOpen(true); const handleClose = () => setOpen(false); @@ -30,12 +46,44 @@ const HomePage = () => { aria-labelledby="modal-modal-title" aria-describedby="modal-modal-description" > - - - Text in a modal + + + { + setValue(newValue); + }} + onChangeActive={(event, newHover) => { + setHover(newHover); + }} + emptyIcon={} + /> + {/* {value !== null && ( + {labels[hover !== -1 ? hover : value]} + )} */} + + + Amit Roy + + + amit.roy@sentientgeeks.com + + + "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Temporibus laborum molestiae vitae ipsum sit officia accusantium atque cupiditate modi odio, earum harum, iste a tenetur quam dolor, totam nisi? Dolorem." - - Duis mollis, est non commodo luctus, nisi erat porttitor ligula. + + April 17, 03:30PM