11import type { DashboardItem , DashboardRuntime } from '../types' ;
22import { MdOutlineFileDownload , MdOutlineVisibilityOff } from 'react-icons/md' ;
33import {
4+ itemCardActionToneClass ,
45 itemCardToneClass ,
56 stateBadgeClass ,
67 typeBadgeClass ,
@@ -40,7 +41,7 @@ export function DashboardItemCard({
4041 role = { canOpenItem ? 'button' : undefined }
4142 tabIndex = { canOpenItem ? 0 : undefined }
4243 className = { [
43- 'w-full relative rounded-xl border px-3 py-3 text-left shadow-[0_4px_10px_rgba(15,23,42,0.05)] transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100' ,
44+ 'group w-full relative rounded-xl border px-3 py-3 text-left shadow-[0_4px_10px_rgba(15,23,42,0.05)] transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100' ,
4445 canOpenItem ? 'cursor-pointer' : 'cursor-default' ,
4546 itemCardToneClass ( item . type ) ,
4647 ] . join ( ' ' ) }
@@ -80,7 +81,6 @@ export function DashboardItemCard({
8081 ) }
8182 </ div >
8283 </ div >
83-
8484 < div className = "mb-[2px] flex items-center gap-1.5" >
8585 < span
8686 className = { [
@@ -97,39 +97,46 @@ export function DashboardItemCard({
9797 { item . title }
9898 </ span >
9999 </ div >
100+ < div className = "flex justify-between w-full" >
101+ < div className = "flex flex-col gap-0.5" >
102+ { detailMetaLines . map ( ( line , index ) => (
103+ < p
104+ key = { `detail-${ item . id } -${ index } ` }
105+ className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
106+ >
107+ { line }
108+ </ p >
109+ ) ) }
100110
101- < div className = "flex flex-col gap-0.5" >
102- { detailMetaLines . map ( ( line , index ) => (
103- < p
104- key = { `detail-${ item . id } -${ index } ` }
105- className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
106- >
107- { line }
108- </ p >
109- ) ) }
110-
111- { extraMetaLines . map ( ( line , index ) => (
112- < p
113- key = { `extra-${ item . id } -${ index } ` }
114- className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
115- >
116- { line }
117- </ p >
118- ) ) }
111+ { extraMetaLines . map ( ( line , index ) => (
112+ < p
113+ key = { `extra-${ item . id } -${ index } ` }
114+ className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
115+ >
116+ { line }
117+ </ p >
118+ ) ) }
119119
120- { periodMetaLines . map ( ( line , index ) => (
121- < p
122- key = { `period-${ item . id } -${ index } ` }
123- className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
124- >
125- { line }
126- </ p >
127- ) ) }
128- < div className = "flex w-fit absolute right-2 bottom-3" >
120+ { periodMetaLines . map ( ( line , index ) => (
121+ < p
122+ key = { `period-${ item . id } -${ index } ` }
123+ className = "mb-0 mt-0.5 text-[12px] leading-5 break-words whitespace-normal text-zinc-500"
124+ >
125+ { line }
126+ </ p >
127+ ) ) }
128+ </ div >
129+ < div
130+ className = "flex w-fit h-full self-end gap-[2px] mt-auto"
131+ style = { { alignSelf : 'end' , backgroundColor : 'inherit' } }
132+ >
129133 { item . type === 'RESOURCE' && item . url && (
130134 < button
131135 type = "button"
132- className = "inline-flex h-7 w-7 items-center justify-center rounded-md border border-none bg-white p-0 text-[14px] text-zinc-700 transition hover:border-zinc-300 hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100"
136+ className = { [
137+ 'inline-flex h-7 w-7 items-center justify-center rounded-md border border-none p-0 text-[14px] text-zinc-700 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100 hover:cursor-pointer' ,
138+ itemCardActionToneClass ( item . type ) ,
139+ ] . join ( ' ' ) }
133140 title = "자료 다운로드"
134141 aria-label = "자료 다운로드"
135142 onClick = { ( event ) => {
@@ -147,7 +154,10 @@ export function DashboardItemCard({
147154 ) }
148155 < button
149156 type = "button"
150- className = "inline-flex h-7 w-7 items-center justify-center rounded-md border border-none bg-white p-0 text-[14px] text-zinc-700 transition hover:border-zinc-300 hover:bg-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100"
157+ className = { [
158+ 'inline-flex h-7 w-7 items-center justify-center rounded-md border border-none p-0 text-[14px] text-zinc-700 transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-sky-100 hover:cursor-pointer' ,
159+ itemCardActionToneClass ( item . type ) ,
160+ ] . join ( ' ' ) }
151161 title = "이 항목 숨기기"
152162 aria-label = "이 항목 숨기기"
153163 onClick = { ( event ) => {
0 commit comments