Skip to content

Commit c9749a0

Browse files
committed
fix(Radio): Fix display problems that may arise misplaced
1 parent ce70c86 commit c9749a0

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

packages/fluent-ui/src/Radio/Radio.styled.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ const root = (theme: Theme): Style => ({
77
height: 20,
88
borderRadius: '50%',
99
position: 'relative',
10-
display: 'inline-flex',
11-
justifyContent: 'center',
12-
alignItems: 'center',
10+
display: 'inline-block',
1311
border: '2px solid',
1412
cursor: 'pointer',
13+
overflow: 'hidden',
1514
transition: theme.transitions!.radio!,
1615
backgroundColor: theme.colors!.white!.default,
1716
// checked false
@@ -53,13 +52,16 @@ const circle = (theme: Theme): Style => ({
5352
borderRadius: '50%',
5453
transition: theme.transitions!.radio,
5554
backgroundColor: theme.colors!.black!.default,
56-
width: 0,
57-
height: 0,
55+
position: 'absolute',
56+
left: '50%',
57+
top: '50%',
58+
width: 12,
59+
height: 12,
60+
marginLeft: -6,
61+
marginTop: -6,
5862
opacity: 0
5963
})
6064
const circleChecked: Style = {
61-
width: 12,
62-
height: 12,
6365
opacity: 1
6466
}
6567
const circleDisabled = (theme: Theme): Style => ({

0 commit comments

Comments
 (0)