-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* modal measurements wip * underlined button * fixes * change naming --------- Co-authored-by: maksim hodasevich <maksim.hodasevich@gmail.com>
- Loading branch information
1 parent
7c154f2
commit 2666572
Showing
9 changed files
with
119 additions
and
18 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
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,33 @@ | ||
"use client"; | ||
import { useLockBodyScroll } from "@uidotdev/usehooks"; | ||
|
||
export default function MeasurementsModalContent() { | ||
useLockBodyScroll(); | ||
return ( | ||
<div className="flex h-full w-full pt-20 text-buttonTextColor"> | ||
<div className="w-1/2 ">Image placeholder</div> | ||
<div className="w-1/2 "> | ||
<div className="mb-20 flex h-full flex-col"> | ||
<div className="h-1/3">measurements</div> | ||
<div className="flex h-1/3 gap-4"> | ||
<div>xs</div> | ||
<div>s</div> | ||
<div>...buttons here taken from dictionary</div> | ||
</div> | ||
<div className="flex h-1/3 gap-40"> | ||
<div className="flex flex-col gap-4"> | ||
<div>length</div> | ||
<div>chest</div> | ||
<div>shoulders</div> | ||
</div> | ||
<div className="flex flex-col gap-4"> | ||
<div>74cm</div> | ||
<div>74cm</div> | ||
<div>...values taken from dictionary</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
"use client"; | ||
|
||
import { useState } from "react"; | ||
|
||
export default function Modal({ | ||
children, | ||
openElement, | ||
}: { | ||
children: React.ReactNode; | ||
openElement: React.ReactNode; | ||
}) { | ||
const [isModalOpen, setModalOpen] = useState(false); | ||
|
||
const openModal = () => setModalOpen(true); | ||
const closeModal = () => setModalOpen(false); | ||
|
||
return ( | ||
<div> | ||
<div onClick={openModal}>{openElement}</div> | ||
{isModalOpen && ( | ||
<div className="fixed inset-0 z-50 bg-textColor"> | ||
<button | ||
onClick={closeModal} | ||
className="absolute right-4 top-4 cursor-pointer text-buttonTextColor" | ||
> | ||
[closeIcon] | ||
</button> | ||
{children} | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} |