Closed
Description
Bug report
Current Behavior
If you hover over a <label />
associated with a Radix Checkbox (or <input />
), the checkbox's hover state is triggered.
If you hover over a <LabelPrimitive.Root />
associated with a checkbox (or <input />
), the checkbox's hover state is not triggered.
Expected behavior
The behaviour of <LabelPrimitive.Root />
should match <label />
.
If you follow the documentation for Checkbox:
It shows usage with a standard label element, including a hover effect. If you then switch to using Radix' label component, you lose the hover effect.
Reproducible example
Hover over the labels in this example:
https://codesandbox.io/s/ecstatic-rosalind-eky4tl
Your environment
Software | Name(s) | Version |
---|---|---|
Radix Package(s) | react-checkbox, react-label | 0.1.5 |
React | 17.0.2 | |
Browser | Chromium | 98.0.4758.109 |
Operating System | macOS | 11.6 |