Skip to content

Commit 3205f10

Browse files
authored
fix: give radio/checkbox position relative so the hidden input is contained (#8091)
* give radio position relative so the hidden input is contained * fix checkbox too
1 parent 2d8e30f commit 3205f10

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

packages/@react-spectrum/s2/src/Checkbox.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ export const CheckboxContext = createContext<ContextValue<Partial<CheckboxProps>
4545

4646
const wrapper = style({
4747
display: 'flex',
48+
position: 'relative',
4849
columnGap: 'text-to-control',
4950
alignItems: 'baseline',
5051
width: 'fit',

packages/@react-spectrum/s2/src/Radio.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ interface RenderProps extends RadioRenderProps, ContextProps {}
5050

5151
const wrapper = style({
5252
display: 'flex',
53+
position: 'relative',
5354
columnGap: 'text-to-control',
5455
alignItems: 'baseline',
5556
font: 'control',

0 commit comments

Comments
 (0)