diff --git a/site/src/components/CopyButton.astro b/site/src/components/CopyButton.astro index 5a2e54e..dc4b1fa 100644 --- a/site/src/components/CopyButton.astro +++ b/site/src/components/CopyButton.astro @@ -1,31 +1,53 @@ --- +import { GITHUB_URL } from '../data/site'; + interface Props { targetId: string; label?: string; variant?: 'icon' | 'text'; class?: string; + withAttribution?: boolean; + nudge?: boolean; } -const { targetId, label = 'Copy', variant = 'icon', class: extraClass = '' } = Astro.props; +const { targetId, label = 'Copy', variant = 'icon', class: extraClass = '', withAttribution = false, nudge = false } = Astro.props; const btnId = `copy-btn-${targetId}`; +const nudgeId = `star-nudge-${btnId}`; --- {variant === 'icon' ? ( - + + + {nudge && ( + + )} + ) : (