Skip to content

Commit f537aef

Browse files
authored
feat(icons): add data-icon attribute (#1416)
1 parent e8ce398 commit f537aef

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.changeset/tall-walls-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@launchpad-ui/icons": patch
3+
---
4+
5+
Add `data-icon` attribute

packages/icons/src/Icon.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ const Icon = ({
4444
focusable={focusable}
4545
role={role}
4646
className={icon({ size, variant, className })}
47+
data-icon={name}
4748
{...props}
4849
>
4950
{name && <use href={`#lp-icon-${name}`} />}

0 commit comments

Comments
 (0)