-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff26eab
commit 00954e4
Showing
10 changed files
with
234 additions
and
20 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,15 @@ | ||
export const mockData = { | ||
id: "39c828aa-be66-4e15-b779-2a8e6ed109b1", | ||
ownerAddress: "B62qp6gZq79pG59hRyYA62oiSFHXfY1wncAfSLgWrYEhACAnt93bq1X", | ||
transaction: "CkpZj5f4Y3sQqaTgha57sLXSxkq6fWXm5ejv9EmxiBDtyv9QbxFVc", | ||
domainName: "HelloWorld", | ||
domainImg: | ||
"https://api-mainnet.suifrens.sui.io/suifrens/0x55706dcf91bffd49373f93362d00999732fd0edf4920f92e37f19a8ff4daa25c/svg", | ||
amount: 74, | ||
reservationTimestamp: 1710000000000, | ||
expirationTime: 3, | ||
startTimestamp: 1710000000000, | ||
domainStatus: "ACTIVE", | ||
isSendToCloudWorker: false, | ||
isDefault: false, | ||
}; |
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,58 @@ | ||
.content { | ||
padding: 48px 45px 24px 45px; | ||
background-color: var(--col--light); | ||
border-radius: 12px; | ||
position: relative; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.content .closeIcon { | ||
width: 24px; | ||
height: 24px; | ||
position: absolute; | ||
top: 24px; | ||
right: 24px; | ||
cursor: pointer; | ||
transition: all 0.2s; | ||
} | ||
|
||
.closeIcon:hover { | ||
opacity: 0.5; | ||
} | ||
|
||
.content img { | ||
width: 234px; | ||
height: 234px; | ||
} | ||
|
||
.content button { | ||
margin-top: 25px; | ||
} | ||
|
||
.infoWrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
width: 100%; | ||
} | ||
|
||
.header { | ||
text-align: center; | ||
font-size: 16px; | ||
} | ||
|
||
.infoItem > span { | ||
color: rgba(0, 0, 0, 0.3); | ||
font-size: 13px; | ||
} | ||
|
||
.infoItem div { | ||
color: var(--col--dark); | ||
} | ||
|
||
.infoItem div span { | ||
background-color: var(--col--dark); | ||
} |
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,90 @@ | ||
import Image from "next/image"; | ||
import PopupOverlay from "../../popupOverlay"; | ||
import icon from "../../../../assets/logo.svg"; | ||
import closeIcon from "../../../../assets/close.svg"; | ||
import { Button } from "@/components/atoms/button"; | ||
import { Variant } from "@/components/atoms/button/types"; | ||
import classNames from "classnames"; | ||
import { interMedium, interSemiBold } from "@/app/fonts"; | ||
import { StaticEllipse } from "../../staticEllipse"; | ||
import { monthDayYearTimeFormat } from "@/helpers/timeHelper"; | ||
|
||
import style from "./index.module.css"; | ||
|
||
type ModalInfoProps = { | ||
open: boolean; | ||
onClose: () => void; | ||
data: { | ||
id: string; | ||
ownerAddress: string; | ||
transaction: string; | ||
domainName: string; | ||
domainImg: string; | ||
amount: number; | ||
reservationTimestamp: number; | ||
expirationTime: number; | ||
startTimestamp: number; | ||
domainStatus: string; | ||
isSendToCloudWorker: boolean; | ||
isDefault: boolean; | ||
}; | ||
}; | ||
|
||
const ModalInfo = ({ open, onClose, data }: ModalInfoProps): JSX.Element => { | ||
const { | ||
ownerAddress, | ||
domainName, | ||
reservationTimestamp, | ||
domainImg, | ||
transaction, | ||
} = data; | ||
|
||
return ( | ||
<PopupOverlay | ||
position="center" | ||
animation="appear" | ||
onClose={onClose} | ||
show={open} | ||
> | ||
<div className={classNames(style.content, interSemiBold.className)}> | ||
<Image | ||
src={closeIcon} | ||
alt="" | ||
className={style.closeIcon} | ||
onClick={onClose} | ||
width={240} | ||
height={240} | ||
/> | ||
<Image src={icon} alt="" /> | ||
<div className={style.header}>{domainName}</div> | ||
<div className={style.infoWrapper}> | ||
<div className={classNames(style.infoItem, interMedium.className)}> | ||
<span>Domain Owner</span> | ||
<StaticEllipse | ||
className={interSemiBold.className} | ||
text={ownerAddress} | ||
view={{ sm: 10, md: 14, lg: 18 }} | ||
/> | ||
</div> | ||
<div className={classNames(style.infoItem, interMedium.className)}> | ||
<span>Creation Time</span> | ||
<div className={interSemiBold.className}> | ||
{monthDayYearTimeFormat(reservationTimestamp)} | ||
</div> | ||
</div> | ||
<div className={classNames(style.infoItem, interMedium.className)}> | ||
<span>Creation Transaction</span> | ||
<StaticEllipse | ||
className={interSemiBold.className} | ||
text={transaction} | ||
view={{ sm: 10, md: 14, lg: 18 }} | ||
/> | ||
</div> | ||
</div> | ||
<Button text="View Details" variant={Variant.blue} /> | ||
</div> | ||
</PopupOverlay> | ||
); | ||
}; | ||
|
||
export default ModalInfo; |
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