-
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.
feat: home 페이지의 dnd 섹션 마크업 및 section title 공통 컴포넌트 구현
- Loading branch information
1 parent
82d961f
commit 6385322
Showing
8 changed files
with
164 additions
and
35 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.main { | ||
width: 100%; | ||
max-width: 1156px; | ||
max-width: 1204px; | ||
margin: 0 auto; | ||
padding: 0 24px; | ||
} |
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,39 @@ | ||
@import '/src/styles/main'; | ||
|
||
.counterCard { | ||
user-select: none; | ||
display: flex; | ||
flex-direction: column; | ||
padding: 50px; | ||
align-items: center; | ||
justify-content: center; | ||
border-radius: 8px; | ||
background-color: color('gray08'); | ||
width: 100%; | ||
max-width: 271px; | ||
|
||
.title { | ||
text-align: center; | ||
font-size: 20px; | ||
font-weight: 700; | ||
line-height: 160%; | ||
letter-spacing: -0.2px; | ||
|
||
@include text-color('gray04'); | ||
} | ||
|
||
.counter { | ||
display: flex; | ||
font-size: 48px; | ||
font-weight: 700; | ||
line-height: 140%; | ||
letter-spacing: -0.48px; | ||
|
||
@include text-color('white'); | ||
|
||
& > strong { | ||
font-size: 56px; | ||
letter-spacing: -0.56px; | ||
} | ||
} | ||
} |
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,22 @@ | ||
import styles from './index.module.scss'; | ||
|
||
type Props = { | ||
title: string; | ||
count: number; | ||
suffix?: string; | ||
}; | ||
|
||
function CounterCard({ count, title, suffix = '명' }: Props) { | ||
return ( | ||
<div className={styles.counterCard}> | ||
<div className={styles.title}>{title}</div> | ||
<div className={styles.counter}> | ||
<strong>{count}</strong> | ||
| ||
{suffix} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default CounterCard; |
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,19 @@ | ||
@import '/src/styles/main'; | ||
|
||
.section { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
padding: 100px 0; | ||
gap: 72px; | ||
|
||
.title { | ||
text-align: center; | ||
font-size: 44px; | ||
font-weight: 700; | ||
line-height: 160%; | ||
letter-spacing: -0.44px; | ||
|
||
@include text-color('gray01'); | ||
} | ||
} |
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,18 @@ | ||
import { PropsWithChildren } from 'react'; | ||
|
||
import styles from './index.module.scss'; | ||
|
||
type Props = { | ||
title: string; | ||
}; | ||
|
||
function SectionTitle({ title, children }: PropsWithChildren<Props>) { | ||
return ( | ||
<section className={styles.section}> | ||
<h2 className={styles.title}>{title}</h2> | ||
{children} | ||
</section> | ||
); | ||
} | ||
|
||
export default SectionTitle; |
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 |
---|---|---|
|
@@ -48,3 +48,9 @@ | |
} | ||
} | ||
} | ||
|
||
.counterCardWrapper { | ||
display: flex; | ||
flex-flow: row wrap; | ||
gap: 24px; | ||
} |
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