Skip to content

Commit 69c0e29

Browse files
committed
tweak style prop
1 parent 95b1c36 commit 69c0e29

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

packages/react/radio-group/src/radio-group.tsx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,17 @@ const RadioGroupItem = React.forwardRef<RadioGroupItemElement, RadioGroupItemPro
304304
internal_do_not_use_render={({ isFormControl }: RadioContextValue) => (
305305
<>
306306
<RadioGroupItemTrigger {...triggerProps} {...radioScope} ref={forwardedRef} />
307-
{isFormControl && <RadioBubbleInput {...radioScope} />}
307+
{isFormControl && (
308+
<RadioBubbleInput
309+
{...radioScope}
310+
style={{
311+
// We transform because the input is absolutely positioned but we have
312+
// rendered it **after** the button. This pulls it back to sit on top
313+
// of the button.
314+
transform: 'translateX(-100%)',
315+
}}
316+
/>
317+
)}
308318
</>
309319
)}
310320
/>

packages/react/radio-group/src/radio.tsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,6 @@ const RadioBubbleInput = React.forwardRef<HTMLInputElement, RadioBubbleInputProp
252252
style={{
253253
...props.style,
254254
...controlSize,
255-
// We transform because the input is absolutely positioned but we have
256-
// rendered it **after** the button. This pulls it back to sit on top
257-
// of the button.
258-
transform: 'translateX(-100%)',
259255
position: 'absolute',
260256
pointerEvents: 'none',
261257
opacity: 0,

0 commit comments

Comments
 (0)