fix: MetalCard onClick 미전달 문제 수정
MetalCard가 onClick/sx props를 받지 않아 클릭 이벤트가 전달되지 않던 문제. 세션 카드와 템플릿 선택 카드를 Box로 감싸서 onClick 처리.
This commit is contained in:
parent
2b17bf47b7
commit
55774b64e0
4 changed files with 22 additions and 12 deletions
|
|
@ -107,7 +107,7 @@ export function AddDocumentDialog({
|
|||
{/* 템플릿 목록 */}
|
||||
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1 }}>
|
||||
{templates.map((tp) => (
|
||||
<MetalCard
|
||||
<Box
|
||||
key={tp.id}
|
||||
onClick={() => !generating && setSelectedId(tp.id)}
|
||||
sx={{
|
||||
|
|
@ -115,19 +115,22 @@ export function AddDocumentDialog({
|
|||
opacity: generating ? 0.6 : 1,
|
||||
border:
|
||||
selectedId === tp.id
|
||||
? `1px solid ${d3roPalette.accent.amber}`
|
||||
: `1px solid ${d3roPalette.border.subtle}`,
|
||||
? `2px solid ${d3roPalette.accent.amber}`
|
||||
: `2px solid transparent`,
|
||||
borderRadius: d3roRadius.inner,
|
||||
transition: 'border-color 0.15s',
|
||||
'&:hover': {
|
||||
borderColor: generating ? undefined : d3roPalette.accent.amberDim,
|
||||
},
|
||||
}}
|
||||
>
|
||||
<PhosphorText variant="compact">{tp.name}</PhosphorText>
|
||||
<PhosphorText variant="dim" sx={{ fontSize: 11, mt: 0.25 }}>
|
||||
{tp.description}
|
||||
</PhosphorText>
|
||||
</MetalCard>
|
||||
<MetalCard>
|
||||
<PhosphorText variant="compact">{tp.name}</PhosphorText>
|
||||
<PhosphorText variant="dim" sx={{ fontSize: 11, mt: 0.25 }}>
|
||||
{tp.description}
|
||||
</PhosphorText>
|
||||
</MetalCard>
|
||||
</Box>
|
||||
))}
|
||||
</Box>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue