Skip to content

Commit 6ca0670

Browse files
committed
fix(ds/iconography): copy the supported 'Icon' export name instead of the deprecated alias
1 parent bfac91e commit 6ca0670

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/routes/ds.iconography.lazy.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ function IconographyPage() {
8080

8181
const shown = filtered.slice(0, visible)
8282

83+
// The registry keys icons by their bare name, but `NameIcon` is the export
84+
// callers actually import — copy and advertise that one.
8385
const handleCopy = React.useCallback(async (name: string) => {
84-
await copyTextToClipboard(`<${name} />`)
86+
await copyTextToClipboard(`<${name}Icon />`)
8587
setCopied(name)
8688
window.setTimeout(() => setCopied(null), 1200)
8789
}, [])
@@ -187,7 +189,7 @@ function IconographyPage() {
187189
key={name}
188190
type="button"
189191
onClick={() => handleCopy(name)}
190-
title={`Copy <${name} />`}
192+
title={`Copy <${name}Icon />`}
191193
className="group flex flex-col items-center gap-2.5 bg-background-default p-5 text-center transition-colors hover:bg-background-subtle"
192194
>
193195
<span className="flex h-12 items-center justify-center">

0 commit comments

Comments
 (0)