File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ interface PageHeaderProps {
2+ label : string ;
3+ title : string ;
4+ labelColor ?: "primary" | "tertiary" ;
5+ fetchedAt ?: Date ;
6+ }
7+
8+ export function PageHeader ( {
9+ label,
10+ title,
11+ labelColor = "primary" ,
12+ fetchedAt,
13+ } : PageHeaderProps ) {
14+ const colorClass =
15+ labelColor === "tertiary" ? "text-tertiary" : "text-primary" ;
16+
17+ return (
18+ < div className = "pt-32 pb-12 px-6 md:px-12" >
19+ < div className = "flex flex-col md:flex-row justify-between md:items-end gap-4" >
20+ < div >
21+ < span
22+ className = { `font-label ${ colorClass } tracking-widest uppercase text-xs mb-4 block` }
23+ >
24+ { label }
25+ </ span >
26+ < h2 className = "font-headline text-4xl md:text-6xl font-bold tracking-tighter" >
27+ { title }
28+ </ h2 >
29+ </ div >
30+ { fetchedAt && (
31+ < div className = "text-right hidden md:block" >
32+ < p className = "font-label text-[10px] tracking-widest text-outline" >
33+ 최근 갱신 //{ " " }
34+ { fetchedAt . toLocaleString ( "ko-KR" , {
35+ timeZone : "Asia/Seoul" ,
36+ year : "numeric" ,
37+ month : "2-digit" ,
38+ day : "2-digit" ,
39+ hour : "2-digit" ,
40+ minute : "2-digit" ,
41+ } ) }
42+ </ p >
43+ </ div >
44+ ) }
45+ </ div >
46+ </ div >
47+ ) ;
48+ }
You can’t perform that action at this time.
0 commit comments