-
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/theme-image-preview…
…-logic # Conflicts: # app/admin/(components)/ThemeInfo/ThemeImage.tsx # app/admin/(consts)/sidebar.ts # app/components/common/Dialog-new/dialog.sass
- Loading branch information
Showing
81 changed files
with
695 additions
and
2,363 deletions.
There are no files selected for viewing
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
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,80 @@ | ||
import Image from "next/image"; | ||
import React, { useRef, useState } from "react"; | ||
|
||
import Tooltip from "@/admin/(components)/Tooltip/Container"; | ||
import Dialog from "@/components/common/Dialog-new/Image-Dialog-new/Dialog"; | ||
import PreviewDialog from "@/components/common/Dialog-new/Preview-Dialog-new/PreviewDialog"; | ||
import useModal from "@/hooks/useModal"; | ||
|
||
export default function ThemeImage() { | ||
const QuestionProps = { | ||
src: "/images/svg/icon_question.svg", | ||
alt: "gallery_image", | ||
width: 24, | ||
height: 24, | ||
}; | ||
|
||
const previewProps = { | ||
src: "/images/svg/icon_preview.svg", | ||
alt: "NEXT ROOM", | ||
width: 120, | ||
height: 120, | ||
}; | ||
const { open } = useModal(); | ||
|
||
const imgInputRef = useRef<HTMLInputElement>(null); | ||
const handleAddImageBtnClick = () => { | ||
// 숨겨진 input 클릭 트리거 | ||
// imgInputRef.current?.click(); | ||
open(Dialog); | ||
}; | ||
const handlePreviewImageBtnClick = () => { | ||
// 숨겨진 input 클릭 트리거 | ||
// imgInputRef.current?.click(); | ||
open(PreviewDialog); | ||
}; | ||
const [isHovered, setIsHovered] = useState(false); | ||
|
||
return ( | ||
<div className="theme_image__container"> | ||
<div className="theme-image-title"> | ||
<span>타이머 배경</span> | ||
<div className="theme-image__tooptip"> | ||
<Image | ||
onMouseEnter={() => setIsHovered(true)} | ||
onMouseLeave={() => setIsHovered(false)} | ||
className="tooptip-button" | ||
{...QuestionProps} | ||
/> | ||
{isHovered && <Tooltip />} | ||
</div> | ||
</div> | ||
<div className="theme-images"> | ||
<div className="theme-image-box"> | ||
<Image {...previewProps} /> | ||
<div className="theme-image-dimmed"> | ||
<button className="button28" type="button"> | ||
삭제 | ||
</button> | ||
</div> | ||
</div> | ||
<input | ||
type="file" | ||
// onChange={handleFileInputChange} | ||
accept="image/*" | ||
style={{ display: "none" }} | ||
ref={imgInputRef} | ||
/> | ||
<button | ||
className="secondary_button40" | ||
onClick={handlePreviewImageBtnClick} | ||
> | ||
미리보기 | ||
</button> | ||
<button className="button40" onClick={handleAddImageBtnClick}> | ||
배경 등록하기 | ||
</button> | ||
</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
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
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
Oops, something went wrong.