Skip to content

Commit a0acfba

Browse files
ux: style badge copy row with label, border and better spacing
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 1346fb1 commit a0acfba

File tree

1 file changed

+19
-6
lines changed

1 file changed

+19
-6
lines changed

src/components/CertificateCard.tsx

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -576,17 +576,30 @@ export default function CertificateCard({ cert, onReset }: Props) {
576576
const shieldsUrl = `https://img.shields.io/badge/%F0%9F%AA%A6%20declared%20dead-view%20certificate-555?style=for-the-badge&labelColor=cc0000`
577577
const badgeMd = `[![commitmentissues](${shieldsUrl})](${repoUrl})`
578578
return (
579-
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '10px' }}>
580-
{/* eslint-disable-next-line @next/next/no-img-element */}
581-
<img src={shieldsUrl} alt="commitmentissues badge" style={{ height: '20px', display: 'block', flexShrink: 0 }} />
579+
<div style={{
580+
display: 'flex',
581+
alignItems: 'center',
582+
justifyContent: 'space-between',
583+
gap: '10px',
584+
border: '2px solid #d8cfc4',
585+
background: '#FAF6EF',
586+
padding: '10px 14px',
587+
}}>
588+
<div style={{ display: 'flex', flexDirection: 'column', gap: '6px' }}>
589+
<span style={{ fontFamily: UI, fontSize: '10px', fontWeight: 600, color: '#9a8a7a', letterSpacing: '0.1em', textTransform: 'uppercase' }}>
590+
Add to README
591+
</span>
592+
{/* eslint-disable-next-line @next/next/no-img-element */}
593+
<img src={shieldsUrl} alt="commitmentissues badge" style={{ height: '20px', display: 'block' }} />
594+
</div>
582595
<button
583596
type="button"
584597
onClick={async () => { try { await navigator.clipboard.writeText(badgeMd); setBadgeCopied(true); setTimeout(() => setBadgeCopied(false), 2000) } catch { /* ignore */ } }}
585598
style={{
586599
fontFamily: UI, fontSize: '11px', fontWeight: 700,
587600
flexShrink: 0,
588-
height: '28px',
589-
padding: '0 10px',
601+
height: '32px',
602+
padding: '0 12px',
590603
background: badgeCopied ? '#2a5a2a' : '#0a0a0a',
591604
color: '#fff',
592605
border: 'none',
@@ -595,7 +608,7 @@ export default function CertificateCard({ cert, onReset }: Props) {
595608
transition: 'background 0.15s',
596609
}}
597610
>
598-
{badgeCopied ? '✓ Copied' : 'Copy badge'}
611+
{badgeCopied ? '✓ Copied' : 'Copy'}
599612
</button>
600613
</div>
601614
)

0 commit comments

Comments
 (0)