From 69f50ff3c7749332cc4c57d0d81d165ffaa9ec3b Mon Sep 17 00:00:00 2001 From: Amit Roy Date: Wed, 7 Aug 2024 13:38:54 +0530 Subject: [PATCH] modal design --- src/app/(dashboard)/review/page.tsx | 98 +++---------------- .../reviewModalContent/ReviewModalContent.tsx | 86 ++++++++++++++++ 2 files changed, 101 insertions(+), 83 deletions(-) create mode 100644 src/app/(dashboard)/review/reviewModalContent/ReviewModalContent.tsx diff --git a/src/app/(dashboard)/review/page.tsx b/src/app/(dashboard)/review/page.tsx index a2e8e9a..9df692e 100644 --- a/src/app/(dashboard)/review/page.tsx +++ b/src/app/(dashboard)/review/page.tsx @@ -2,11 +2,10 @@ import React, { useState } from "react"; 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"; -import { Avatar } from "@mui/material"; +import Stack from "@mui/material/Stack"; +import ReviewModalContent from "./reviewModalContent/ReviewModalContent"; +import { Typography } from "@mui/material"; const style = { position: "absolute" as "absolute", top: "50%", @@ -18,7 +17,8 @@ const style = { border: "none", boxShadow: 24, borderRadius: 4, - p: 4, + paddingInline: 2, + paddingBlock: 4, }; const labels: { [index: string]: string } = { 0.5: "Useless", @@ -34,8 +34,6 @@ const labels: { [index: string]: string } = { }; 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); @@ -49,86 +47,20 @@ const HomePage = () => { aria-describedby="modal-modal-description" > - - { - setValue(newValue); - }} - onChangeActive={(event, newHover) => { - setHover(newHover); - }} - emptyIcon={ - - } - /> - {/* {value !== null && ( - {labels[hover !== -1 ? hover : value]} - )} */} - - - April 17, 03:30PM - - "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." + Reviews - - - - - Amit Roy - - - amit.roy@sentientgeeks.com - - - + + + diff --git a/src/app/(dashboard)/review/reviewModalContent/ReviewModalContent.tsx b/src/app/(dashboard)/review/reviewModalContent/ReviewModalContent.tsx new file mode 100644 index 0000000..faa4f74 --- /dev/null +++ b/src/app/(dashboard)/review/reviewModalContent/ReviewModalContent.tsx @@ -0,0 +1,86 @@ +import React from "react"; +import Box from "@mui/material/Box"; +import Typography from "@mui/material/Typography"; +import Rating from "@mui/material/Rating"; +import StarIcon from "@mui/icons-material/Star"; +import { Avatar } from "@mui/material"; + +const ReviewModalContent = () => { + const [value, setValue] = React.useState(2); + const [hover, setHover] = React.useState(-1); + return ( + <> + + + + + + Amit Roy + + + amit.roy@sentientgeeks.com + + + + { + setValue(newValue); + }} + onChangeActive={(event, newHover) => { + setHover(newHover); + }} + emptyIcon={ + + } + /> + + April 17, 03:30PM + + + + + + + "Lorem ipsum dolor, sit amet consectetur adipisicing elit. Temporibus + Dolorem." + + + + ); +}; + +export default ReviewModalContent;