Skip to content

Commit

Permalink
Merge branch 'main' of github.com:andy89923/DVVA_Final-Project
Browse files Browse the repository at this point in the history
  • Loading branch information
scott306lr committed Jan 12, 2023
2 parents 8d3e222 + 097f831 commit 49b69d2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion movis/src/components/ZoomCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ interface IProps {
title?: string;
children?: React.ReactNode;
className?: string;
manualZoomDim?: string;
}

const ZoomCard: React.FC<IProps> = (props) => {
const [isZoom, setIsZoom] = useState(false);

const { manualZoomDim } = props;

const Header = () => {
return (
<div className="flex items-center justify-between text-white">
Expand All @@ -33,7 +36,11 @@ const ZoomCard: React.FC<IProps> = (props) => {
{props.children}
</div>
<Modal isOpen={isZoom} setIsOpen={setIsZoom}>
<div className=" flex h-screen flex-col gap-4 rounded-xl bg-white/10 p-4 text-2xl">
<div
className={`flex flex-col gap-4 rounded-xl bg-white/10 p-4 text-2xl ${
manualZoomDim ? manualZoomDim : "h-[70vh] w-[70vw]"
}`}
>
<Header />
{props.children}
</div>
Expand Down
7 changes: 6 additions & 1 deletion movis/src/pages/compare/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ const Compare: NextPage = () => {
<ZoomCard
title="Top Rated Movies from Selected"
className="col-span-2 row-span-3"
manualZoomDim=" "
>
<div>
<MyCarousel data={companyData} size={10} />
Expand Down Expand Up @@ -408,7 +409,11 @@ const Compare: NextPage = () => {
</div>
</ZoomCard>

<ZoomCard title="Movies Genres" className="col-span-2 row-span-3">
<ZoomCard
title="Movies Genres"
className="col-span-2 row-span-3"
manualZoomDim="h-screen"
>
<div className="flex h-full flex-col gap-4 rounded-xl bg-white/95 p-4 text-lg text-black hover:bg-white/100">
<MyBarPlot companies={selected} data={companyData} />
</div>
Expand Down

0 comments on commit 49b69d2

Please sign in to comment.