-
Notifications
You must be signed in to change notification settings - Fork 0
feat: FM_SLD_01 뷰 구현 및 로직 수정 (#49) #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3246bb0
c608d07
65c569a
fdfe40d
e3f4b02
55f4cd8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,68 @@ | ||||||||||||||||||||||||||||||||||||||||||
| import type { ReactNode } from 'react'; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| import clsx from 'clsx'; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| import Informaion from '@/assets/icons/icon-info.svg?react'; | ||||||||||||||||||||||||||||||||||||||||||
| import { Logo, Popover } from '@/components/common'; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| interface DarkHeaderProps { | ||||||||||||||||||||||||||||||||||||||||||
| title: string; | ||||||||||||||||||||||||||||||||||||||||||
| renderRight?: ReactNode; | ||||||||||||||||||||||||||||||||||||||||||
| publisher?: string; | ||||||||||||||||||||||||||||||||||||||||||
| publishedAt?: string; | ||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| export const DarkHeader = ({ | ||||||||||||||||||||||||||||||||||||||||||
| title, | ||||||||||||||||||||||||||||||||||||||||||
| renderRight, | ||||||||||||||||||||||||||||||||||||||||||
| publisher = '익명의 바다거북이', | ||||||||||||||||||||||||||||||||||||||||||
| publishedAt = '2025.11.25 21:10:34', | ||||||||||||||||||||||||||||||||||||||||||
| }: DarkHeaderProps) => { | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+11
to
+20
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||||||
| return ( | ||||||||||||||||||||||||||||||||||||||||||
| <header className="flex h-15 w-full shrink-0 items-center justify-between border-b border-gray-600 bg-gray-800 px-6 md:px-18"> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex items-center gap-4"> | ||||||||||||||||||||||||||||||||||||||||||
| <Logo /> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <div className="flex items-center gap-1.5"> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="text-sm font-bold text-white">{title}</span> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| <Popover | ||||||||||||||||||||||||||||||||||||||||||
| trigger={({ isOpen }) => ( | ||||||||||||||||||||||||||||||||||||||||||
| <button | ||||||||||||||||||||||||||||||||||||||||||
| type="button" | ||||||||||||||||||||||||||||||||||||||||||
| className={clsx( | ||||||||||||||||||||||||||||||||||||||||||
| 'flex items-center justify-center transition-colors', | ||||||||||||||||||||||||||||||||||||||||||
| // 열려있거나 호버시 흰색, 평소엔 회색 | ||||||||||||||||||||||||||||||||||||||||||
| isOpen ? 'text-white' : 'text-gray-200 hover:text-white', | ||||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||
| <Informaion className="h-4 w-4 translate-y-[1px]" /> | ||||||||||||||||||||||||||||||||||||||||||
| </button> | ||||||||||||||||||||||||||||||||||||||||||
| )} | ||||||||||||||||||||||||||||||||||||||||||
| align="end" // 팝오버 왼쪽 정렬 (취향에 따라 center로 변경 가능) | ||||||||||||||||||||||||||||||||||||||||||
| position="bottom" | ||||||||||||||||||||||||||||||||||||||||||
| className="w-[250px] max-w-[calc(100vw-2rem)] rounded-lg bg-white p-4 shadow-lg ring-1 ring-black/5 left-1/2 right-auto -translate-x-1/2 md:left-auto md:right-0 md:translate-x-0" | ||||||||||||||||||||||||||||||||||||||||||
| > | ||||||||||||||||||||||||||||||||||||||||||
| {/* 팝오버 내부 콘텐츠 (사진 디자인 반영) */} | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex flex-col gap-2"> | ||||||||||||||||||||||||||||||||||||||||||
| {/* 행 1: 게시자 */} | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex items-center gap-4"> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="w-14 text-body-s-bold text-gray-600">게시자</span> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="text-body-s text-gray-800">{publisher}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| {/* 행 2: 게시 날짜 */} | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex items-center gap-4"> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="w-14 text-body-s-bold text-gray-600">게시 날짜</span> | ||||||||||||||||||||||||||||||||||||||||||
| <span className="text-body-s text-gray-800">{publishedAt}</span> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| </Popover> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| </div> | ||||||||||||||||||||||||||||||||||||||||||
| <div className="flex items-center">{renderRight}</div> | ||||||||||||||||||||||||||||||||||||||||||
| </header> | ||||||||||||||||||||||||||||||||||||||||||
| ); | ||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||
| export default DarkHeader; | ||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@openai/codex패키지가 추가되었는데, 이 프로젝트에서 사용될 예정인가요? 만약 의도치 않게 추가된 의존성이라면, 번들 크기를 줄이고 잠재적인 보안 위험을 피하기 위해 제거하는 것이 좋습니다.