Skip to content

Commit e443cf6

Browse files
committed
feat(terracotta): add TerracottaOutputCard component
1 parent 1dc5c01 commit e443cf6

1 file changed

Lines changed: 40 additions & 0 deletions

File tree

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
import { CopySimpleIcon } from '@phosphor-icons/react';
3+
4+
const TerracottaOutputCard = ({ title, description, value, onCopy }) => {
5+
return (
6+
<div className="flex flex-col gap-2 p-4 border border-[#1A161320] bg-[#E8DECE]/40 group relative overflow-hidden transition-all duration-300 hover:bg-[#E8DECE]/70 hover:border-[#C96442]/40">
7+
<div className="absolute top-0 left-0 w-full h-[2px] bg-gradient-to-r from-[#C96442]/0 via-[#C96442]/0 to-transparent group-hover:from-[#C96442]/60 group-hover:via-[#C96442]/30 transition-all duration-500" />
8+
<div className="absolute top-0 left-0 w-[2px] h-0 bg-[#C96442]/60 group-hover:h-full transition-all duration-500" />
9+
<div className="absolute bottom-0 left-0 w-full h-12 bg-gradient-to-t from-[#C96442]/10 to-transparent opacity-0 group-hover:opacity-100 transition-all duration-500 pointer-events-none" />
10+
11+
<div className="flex items-center justify-between">
12+
<div className="flex flex-col">
13+
<span className="text-[10px] font-mono font-bold text-[#2E2620]/70 uppercase tracking-widest">
14+
{title}
15+
</span>
16+
{description && (
17+
<span className="text-[9px] font-mono text-[#2E2620]/50 tracking-tight">
18+
{description}
19+
</span>
20+
)}
21+
</div>
22+
{onCopy && (
23+
<button
24+
onClick={() => onCopy(value)}
25+
className="text-[#2E2620]/50 hover:text-[#9E4A2F] transition-colors"
26+
title="Copy Output"
27+
>
28+
<CopySimpleIcon size={14} weight="bold" />
29+
</button>
30+
)}
31+
</div>
32+
33+
<div className="font-mono text-sm text-[#1A1613] break-all line-clamp-2 min-h-[2.5rem] relative z-10">
34+
{value || <span className="opacity-20">---</span>}
35+
</div>
36+
</div>
37+
);
38+
};
39+
40+
export default TerracottaOutputCard;

0 commit comments

Comments
 (0)