-
Notifications
You must be signed in to change notification settings - Fork 2
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
REV-75/설명 컴포넌트 구현 #10
The head ref may contain hidden characters: "REV-75/\uC124\uBA85-\uCEF4\uD3EC\uB10C\uD2B8-\uAD6C\uD604"
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
interface PageIntroProps { | ||
imageSrc?: string | ||
description: string | ||
colorTheme: string | ||
} | ||
|
||
const PageIntro = ({ imageSrc, description, colorTheme }: PageIntroProps) => { | ||
const boxDefaultStyle = `border-2 p-4 whitespace-pre-line border-${colorTheme}-500` | ||
const textDefaultStyle = `text-${colorTheme}-900 text-sm sm:text-base` | ||
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. 같은 colorTheme이므로 text와 box의 border은 항상 같은 색깔이 되겠군요? 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. 넹 같은 색깔이 될 것 같아요! |
||
|
||
return imageSrc ? ( | ||
<div className={`flex items-center gap-x-8 ${boxDefaultStyle}`}> | ||
<img | ||
className="max-w-20 max-h-20 object-cover" | ||
src={imageSrc} | ||
alt="페이지를 소개하는 npc 아이콘" | ||
/> | ||
<p className={`${textDefaultStyle}`}>{description}</p> | ||
</div> | ||
) : ( | ||
<div className={`${boxDefaultStyle}`}> | ||
<p className={`${textDefaultStyle}`}>{description}</p> | ||
</div> | ||
) | ||
} | ||
|
||
export default PageIntro |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './PageIntro' |
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.
whitespace-pre-line 처음 알았습니다!!
배우고 갑니다 🙏