-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/theme-image-preview' into feat/refactor-router
# Conflicts: # app/admin/Admin.tsx
- Loading branch information
Showing
20 changed files
with
313 additions
and
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import Image from "next/image"; | ||
import React from "react"; | ||
|
||
import "../../(style)/tooltip.modules.sass"; | ||
import { arrowProps, timerTooltipProps } from "@/admin/(consts)/sidebar"; | ||
|
||
export default function Container() { | ||
return ( | ||
<div className="tooltip-container"> | ||
<Image className="arrow" {...arrowProps} /> | ||
<div className="content-container"> | ||
<span className="content-container__title">타이머 배경이란?</span> | ||
<p className="content-container__content"> | ||
힌트폰 타이머에 테마별로 원하는 배경을 넣어 우리 매장만의 힌트폰을 | ||
제공할 수 있습니다. 타이머 배경을 설정하지 않으면 기본 이미지로 | ||
나타납니다. | ||
</p> | ||
<div className="content-container__image"> | ||
<Image {...timerTooltipProps} /> | ||
</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,41 @@ | ||
@import '../../style/variables' | ||
@import '../../style/mixins' | ||
|
||
.arrow | ||
position: absolute | ||
top: -12px | ||
left: 139px | ||
|
||
.tooltip-container | ||
position: fixed | ||
top: 200px | ||
left: 260px | ||
z-index: 999 | ||
|
||
.content-container | ||
display: hidden | ||
background-color: white | ||
width: 298px | ||
height: 421px | ||
border-radius: 12px | ||
padding: 24px | ||
|
||
&__title | ||
@include title16SB | ||
color: $color-black | ||
|
||
&__content | ||
@include body14R | ||
color: $color-sub2 | ||
margin: 8px 0 16px | ||
|
||
&__image | ||
width: 250px | ||
height: 250px | ||
background-color: #0000001F | ||
border-radius: 12px | ||
padding: 12px 0 14px | ||
display: flex | ||
flex-direction: column | ||
align-items: center | ||
|
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
66 changes: 66 additions & 0 deletions
66
app/components/common/Dialog-new/Noti-Dialog-new/Dialog.tsx
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,66 @@ | ||
import React, { forwardRef, useRef } from "react"; | ||
|
||
import useClickOutside from "@/hooks/useClickOutside"; | ||
import useModal from "@/hooks/useModal"; | ||
import ModalPortal from "@/components/common/Dialog-new/ModalPortal"; | ||
import { setLocalStorage } from "@/utils/localStorage"; | ||
|
||
import DialogBody from "./DialogBody"; | ||
|
||
import "@/components/common/Dialog-new/dialog.sass"; | ||
|
||
interface DialogProps { | ||
type?: string | ""; | ||
} | ||
|
||
const Dialog = forwardRef<HTMLFormElement, DialogProps>((props) => { | ||
const { close } = useModal(); | ||
const checkboxRef = useRef<HTMLInputElement>(null); | ||
const { type = "" } = props; | ||
const formRef = useRef<HTMLFormElement | null>(null); | ||
const handleViewDetailBtn = () => { | ||
close(); | ||
}; | ||
const handleCloseBtn = () => { | ||
if (checkboxRef.current?.checked) { | ||
setLocalStorage("hideDialog", "true"); | ||
} | ||
close(); | ||
}; | ||
|
||
useClickOutside(formRef, close); | ||
|
||
return ( | ||
<ModalPortal> | ||
<form | ||
className={`theme-info-modal ${type}`} | ||
onClick={(e) => e.stopPropagation()} | ||
> | ||
<div className="theme-info-modal__header noti"> | ||
<h2>새로운 기능을 소개합니다✨</h2> | ||
</div> | ||
<DialogBody /> | ||
<div className="theme-info-modal__footer"> | ||
<div className="dont-show-again"> | ||
<input type="checkbox" name="" id="hideDialog" ref={checkboxRef} /> | ||
<label htmlFor="hideDialog">다시 보지 않기</label> | ||
</div> | ||
<div className="action-buttons"> | ||
<button | ||
className="secondary_button40" | ||
type="button" | ||
onClick={handleViewDetailBtn} | ||
> | ||
자세히 보기 | ||
</button> | ||
<button className="button40" type="button" onClick={handleCloseBtn}> | ||
확인 | ||
</button> | ||
</div> | ||
</div> | ||
</form> | ||
</ModalPortal> | ||
); | ||
}); | ||
|
||
export default Dialog; |
33 changes: 33 additions & 0 deletions
33
app/components/common/Dialog-new/Noti-Dialog-new/DialogBody.tsx
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 @@ | ||
import React from "react"; | ||
import Image from "next/image"; | ||
|
||
import { notiImageProps } from "@/admin/(consts)/sidebar"; | ||
|
||
export default function DialogBody() { | ||
const previewProps = { | ||
src: "/images/svg/preview.svg", | ||
alt: "NEXT ROOM", | ||
width: 158, | ||
height: 340, | ||
}; | ||
|
||
return ( | ||
<div className="theme-info-modal__noti-content"> | ||
<Image {...notiImageProps} /> | ||
<div className="theme-info-modal__feature-description"> | ||
<span className="theme-info-modal__feature-description__title"> | ||
타이머 배경 | ||
</span> | ||
<p className="theme-info-modal__feature-description__summary"> | ||
타이머에 원하는 배경을 넣어보세요 | ||
</p> | ||
<p className="theme-info-modal__feature-description__detail"> | ||
기본 배경 대신 방탈출 테마 포스터를 등록하여 타이머 배경을 커스텀 할 | ||
수 있습니다. | ||
<br />각 테마의 독특한 분위기를 더욱 살리고, 플레이어들에게 몰입감을 | ||
제공해보세요. | ||
</p> | ||
</div> | ||
</div> | ||
); | ||
} |
29 changes: 0 additions & 29 deletions
29
app/components/common/Dialog-new/Preview-Dialog-new/DialogBody.tsx
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.