Skip to content

Commit 22e118b

Browse files
authored
fix(Radio): to have correct id when the label is complexe (#4872)
1 parent a96f772 commit 22e118b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/bright-pens-take.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@ultraviolet/ui": patch
3+
---
4+
5+
Fix `<Radio />` component to have correct id on label

packages/ui/src/components/Radio/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ export const Radio = forwardRef<HTMLInputElement, RadioProps>(
245245
{label}
246246
</StyledTextLabel>
247247
) : (
248-
<StyledLabel htmlFor={id}>{label}</StyledLabel>
248+
<StyledLabel htmlFor={localId}>{label}</StyledLabel>
249249
)}
250250
</>
251251
) : null}

0 commit comments

Comments
 (0)