Skip to content

Commit 6467815

Browse files
authored
Merge pull request #21 from mnajdova/revert-20-feat/classes-badge-improvements
Revert "badge invisible"
2 parents cef8fe9 + f896942 commit 6467815

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

packages/material-ui/src/Badge/Badge.js

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -101,22 +101,16 @@ const BadgeBadge = styled(
101101
minWidth: RADIUS_DOT * 2,
102102
padding: 0,
103103
}),
104-
...(props.styleProps.invisible && {
105-
transition: props.theme.transitions.create('transform', {
106-
easing: props.theme.transitions.easing.easeInOut,
107-
duration: props.theme.transitions.duration.leavingScreen,
108-
}),
109-
}),
110104
...(props.styleProps.anchorOrigin.vertical === 'top' &&
111105
props.styleProps.anchorOrigin.horizontal === 'right' &&
112106
props.styleProps.overlap === 'rectangular' && {
113107
top: 0,
114108
right: 0,
115109
transform: 'scale(1) translate(50%, -50%)',
116110
transformOrigin: '100% 0%',
117-
...(props.styleProps.invisible && {
111+
[`&.${badgeClasses.invisible}`]: {
118112
transform: 'scale(0) translate(50%, -50%)',
119-
}),
113+
},
120114
}),
121115
...(props.styleProps.anchorOrigin.vertical === 'bottom' &&
122116
props.styleProps.anchorOrigin.horizontal === 'right' &&
@@ -125,9 +119,9 @@ const BadgeBadge = styled(
125119
right: 0,
126120
transform: 'scale(1) translate(50%, 50%)',
127121
transformOrigin: '100% 100%',
128-
...(props.styleProps.invisible && {
122+
[`&.${badgeClasses.invisible}`]: {
129123
transform: 'scale(0) translate(50%, 50%)',
130-
}),
124+
},
131125
}),
132126
...(props.styleProps.anchorOrigin.vertical === 'top' &&
133127
props.styleProps.anchorOrigin.horizontal === 'left' &&
@@ -136,9 +130,9 @@ const BadgeBadge = styled(
136130
left: 0,
137131
transform: 'scale(1) translate(-50%, -50%)',
138132
transformOrigin: '0% 0%',
139-
...(props.styleProps.invisible && {
133+
[`&.${badgeClasses.invisible}`]: {
140134
transform: 'scale(0) translate(-50%, -50%)',
141-
}),
135+
},
142136
}),
143137
...(props.styleProps.anchorOrigin.vertical === 'bottom' &&
144138
props.styleProps.anchorOrigin.horizontal === 'left' &&
@@ -147,9 +141,9 @@ const BadgeBadge = styled(
147141
left: 0,
148142
transform: 'scale(1) translate(-50%, 50%)',
149143
transformOrigin: '0% 100%',
150-
...(props.styleProps.invisible && {
144+
[`&.${badgeClasses.invisible}`]: {
151145
transform: 'scale(0) translate(-50%, 50%)',
152-
}),
146+
},
153147
}),
154148
...(props.styleProps.anchorOrigin.vertical === 'top' &&
155149
props.styleProps.anchorOrigin.horizontal === 'right' &&
@@ -158,9 +152,9 @@ const BadgeBadge = styled(
158152
right: '14%',
159153
transform: 'scale(1) translate(50%, -50%)',
160154
transformOrigin: '100% 0%',
161-
...(props.styleProps.invisible && {
155+
[`&.${badgeClasses.invisible}`]: {
162156
transform: 'scale(0) translate(50%, -50%)',
163-
}),
157+
},
164158
}),
165159
...(props.styleProps.anchorOrigin.vertical === 'bottom' &&
166160
props.styleProps.anchorOrigin.horizontal === 'right' &&
@@ -169,9 +163,9 @@ const BadgeBadge = styled(
169163
right: '14%',
170164
transform: 'scale(1) translate(50%, 50%)',
171165
transformOrigin: '100% 100%',
172-
...(props.styleProps.invisible && {
166+
[`&.${badgeClasses.invisible}`]: {
173167
transform: 'scale(0) translate(50%, 50%)',
174-
}),
168+
},
175169
}),
176170
...(props.styleProps.anchorOrigin.vertical === 'top' &&
177171
props.styleProps.anchorOrigin.horizontal === 'left' &&
@@ -180,9 +174,9 @@ const BadgeBadge = styled(
180174
left: '14%',
181175
transform: 'scale(1) translate(-50%, -50%)',
182176
transformOrigin: '0% 0%',
183-
...(props.styleProps.invisible && {
177+
[`&.${badgeClasses.invisible}`]: {
184178
transform: 'scale(0) translate(-50%, -50%)',
185-
}),
179+
},
186180
}),
187181
...(props.styleProps.anchorOrigin.vertical === 'bottom' &&
188182
props.styleProps.anchorOrigin.horizontal === 'left' &&
@@ -191,10 +185,16 @@ const BadgeBadge = styled(
191185
left: '14%',
192186
transform: 'scale(1) translate(-50%, 50%)',
193187
transformOrigin: '0% 100%',
194-
...(props.styleProps.invisible && {
188+
[`&.${badgeClasses.invisible}`]: {
195189
transform: 'scale(0) translate(-50%, 50%)',
196-
}),
190+
},
197191
}),
192+
...(props.styleProps.invisible && {
193+
transition: props.theme.transitions.create('transform', {
194+
easing: props.theme.transitions.easing.easeInOut,
195+
duration: props.theme.transitions.duration.leavingScreen,
196+
}),
197+
}),
198198
}));
199199

200200
const extendBadgeClasses = (props) => {

0 commit comments

Comments
 (0)