@@ -94,154 +94,137 @@ export interface TooltipProps extends Omit<TriggerProps, "popup" | "defaultPopup
94
94
95
95
``` css
96
96
.rw-tooltip-root {
97
- position : absolute ;
98
- left : 0 ;
99
- right : 0 ;
100
- top : 0 ;
97
+ position : absolute ;
98
+ left : 0 ;
99
+ right : 0 ;
100
+ top : 0 ;
101
101
}
102
102
103
103
.rw-tooltip {
104
- position : absolute ;
105
- left : 0 ;
106
- top : 0 ;
107
- font-size : 14px ;
108
- z-index : 2000 ;
104
+ position : absolute ;
105
+ left : 0 ;
106
+ top : 0 ;
107
+ font-size : 14px ;
108
+ z-index : 2000 ;
109
109
}
110
110
111
111
.rw-tooltip-mask {
112
- position : fixed ;
113
- left : 0 ;
114
- top : 0 ;
115
- right : 0 ;
116
- bottom : 0 ;
117
- background : #000 ;
118
- opacity : 0.1 ;
119
- z-index : 2000 ;
112
+ position : fixed ;
113
+ left : 0 ;
114
+ top : 0 ;
115
+ right : 0 ;
116
+ bottom : 0 ;
117
+ background : #000 ;
118
+ opacity : 0.1 ;
119
+ z-index : 2000 ;
120
120
}
121
121
122
122
.rw-tooltip-inner {
123
- position : relative ;
124
- min-width : 30px ;
125
- min-height : 32px ;
126
- padding : 6px 8px ;
127
- color : #fff ;
128
- text-align : left ;
129
- text-decoration : none ;
130
- word-wrap : break-word ;
131
- background-color : rgba (0 , 0 , 0 , 0.9 );
132
- border-radius : 2px ;
133
- box-shadow : 0 3px 6px -4px rgba (0 , 0 , 0 , 0.12 ), 0 6px 16px 0 rgba (0 , 0 , 0 , 0.08 ), 0 9px 28px 8px rgba (0 , 0 , 0 , 0.05 );
134
- box-sizing : border-box ;
123
+ position : relative ;
124
+ min-width : 30px ;
125
+ min-height : 32px ;
126
+ padding : 6px 8px ;
127
+ color : #fff ;
128
+ text-align : left ;
129
+ text-decoration : none ;
130
+ word-wrap : break-word ;
131
+ background-color : rgba (0 , 0 , 0 , 0.9 );
132
+ border-radius : 2px ;
133
+ box-shadow : 0 3px 6px -4px rgba (0 , 0 , 0 , 0.12 ), 0 6px 16px 0 rgba (0 , 0 , 0 , 0.08 ),
134
+ 0 9px 28px 8px rgba (0 , 0 , 0 , 0.05 );
135
+ box-sizing : border-box ;
135
136
}
136
137
137
138
.rw-tooltip-arrow {
138
- position : absolute ;
139
- width : 0 ;
140
- height : 0 ;
141
- border-color : transparent ;
142
- border-style : solid ;
139
+ position : absolute ;
140
+ width : 0 ;
141
+ height : 0 ;
142
+ border-color : transparent ;
143
+ border-style : solid ;
143
144
144
- box-sizing : border-box ;
145
+ box-sizing : border-box ;
145
146
}
146
147
147
- .rw-tooltip-placement-top > .rw-tooltip-arrow ,
148
- .rw-tooltip-placement-top-left > .rw-tooltip-arrow ,
149
- .rw-tooltip-placement-top-right > .rw-tooltip-arrow {
150
- bottom : -5px ;
151
- border-width : 5px 5px 0 ;
152
- border-top-color : rgba (0 , 0 , 0 , 0.9 );
148
+ .rw-tooltip-placement-top > .rw-tooltip-arrow ,
149
+ .rw-tooltip-placement-top-left > .rw-tooltip-arrow ,
150
+ .rw-tooltip-placement-top-right > .rw-tooltip-arrow {
151
+ bottom : -5px ;
152
+ border-width : 5px 5px 0 ;
153
+ border-top-color : rgba (0 , 0 , 0 , 0.9 );
153
154
}
154
155
155
- .rw-tooltip-placement-bottom > .rw-tooltip-arrow ,
156
- .rw-tooltip-placement-bottom-left > .rw-tooltip-arrow ,
157
- .rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
158
- top : -5px ;
159
- border-width : 0 5px 5px ;
160
- border-bottom-color : rgba (0 , 0 , 0 , 0.9 );
156
+ .rw-tooltip-placement-bottom > .rw-tooltip-arrow ,
157
+ .rw-tooltip-placement-bottom-left > .rw-tooltip-arrow ,
158
+ .rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
159
+ top : -5px ;
160
+ border-width : 0 5px 5px ;
161
+ border-bottom-color : rgba (0 , 0 , 0 , 0.9 );
161
162
}
162
163
163
- .rw-tooltip-placement-left > .rw-tooltip-arrow ,
164
- .rw-tooltip-placement-left-top > .rw-tooltip-arrow ,
165
- .rw-tooltip-placement-left-bottom > .rw-tooltip-arrow {
166
- right : -5px ;
167
- border-width : 5px 0 5px 5px ;
168
- border-left-color : rgba (0 , 0 , 0 , 0.9 );
164
+ .rw-tooltip-placement-left > .rw-tooltip-arrow ,
165
+ .rw-tooltip-placement-left-top > .rw-tooltip-arrow ,
166
+ .rw-tooltip-placement-left-bottom > .rw-tooltip-arrow {
167
+ right : -5px ;
168
+ border-width : 5px 0 5px 5px ;
169
+ border-left-color : rgba (0 , 0 , 0 , 0.9 );
169
170
}
170
171
171
- .rw-tooltip-placement-right > .rw-tooltip-arrow ,
172
- .rw-tooltip-placement-right-top > .rw-tooltip-arrow ,
173
- .rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
174
- left : -5px ;
175
- border-width : 5px 5px 5px 0 ;
176
- border-right-color : rgba (0 , 0 , 0 , 0.9 );
172
+ .rw-tooltip-placement-right > .rw-tooltip-arrow ,
173
+ .rw-tooltip-placement-right-top > .rw-tooltip-arrow ,
174
+ .rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
175
+ left : -5px ;
176
+ border-width : 5px 5px 5px 0 ;
177
+ border-right-color : rgba (0 , 0 , 0 , 0.9 );
177
178
}
178
179
179
- .rw-tooltip-placement-top-left > .rw-tooltip-arrow ,
180
- .rw-tooltip-placement-bottom-left > .rw-tooltip-arrow {
181
- left : 16px ;
180
+ .rw-tooltip-placement-top-left > .rw-tooltip-arrow ,
181
+ .rw-tooltip-placement-bottom-left > .rw-tooltip-arrow {
182
+ left : 16px ;
182
183
}
183
184
184
- .rw-tooltip-placement-top > .rw-tooltip-arrow ,
185
- .rw-tooltip-placement-bottom > .rw-tooltip-arrow {
186
- left : 50% ;
187
- margin-left : -5px ;
185
+ .rw-tooltip-placement-top > .rw-tooltip-arrow ,
186
+ .rw-tooltip-placement-bottom > .rw-tooltip-arrow {
187
+ left : 50% ;
188
+ margin-left : -5px ;
188
189
}
189
190
190
- .rw-tooltip-placement-top-right > .rw-tooltip-arrow ,
191
- .rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
192
- right : 16px ;
191
+ .rw-tooltip-placement-top-right > .rw-tooltip-arrow ,
192
+ .rw-tooltip-placement-bottom-right > .rw-tooltip-arrow {
193
+ right : 16px ;
193
194
}
194
195
195
- .rw-tooltip-placement-left-top > .rw-tooltip-arrow ,
196
- .rw-tooltip-placement-right-top > .rw-tooltip-arrow {
197
- top : 8px ;
196
+ .rw-tooltip-placement-left-top > .rw-tooltip-arrow ,
197
+ .rw-tooltip-placement-right-top > .rw-tooltip-arrow {
198
+ top : 8px ;
198
199
}
199
200
200
- .rw-tooltip-placement-left > .rw-tooltip-arrow ,
201
- .rw-tooltip-placement-right > .rw-tooltip-arrow {
202
- top : 50% ;
203
- margin-top : -5px ;
201
+ .rw-tooltip-placement-left > .rw-tooltip-arrow ,
202
+ .rw-tooltip-placement-right > .rw-tooltip-arrow {
203
+ top : 50% ;
204
+ margin-top : -5px ;
204
205
}
205
206
206
- .rw-tooltip-placement-left-bottom > .rw-tooltip-arrow ,
207
- .rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
208
- bottom : 8px ;
207
+ .rw-tooltip-placement-left-bottom > .rw-tooltip-arrow ,
208
+ .rw-tooltip-placement-right-bottom > .rw-tooltip-arrow {
209
+ bottom : 8px ;
209
210
}
210
211
211
- .rw-tooltip-animated {
212
- animation-duration : 0.2 s ;
212
+ .rw-tooltip-enter {
213
+ opacity : 0 ;
213
214
}
214
215
215
- .rw-tooltip-fade-in {
216
- animation-name : TooltipFadeIn;
216
+ .rw-tooltip-enter-active {
217
+ opacity : 1 ;
218
+ transition : opacity 200ms ;
217
219
}
218
220
219
- .rw-tooltip-fade-out {
220
- animation-name : TooltipFadeOut ;
221
+ .rw-tooltip-exit {
222
+ opacity : 1 ;
221
223
}
222
224
223
- .rw-tooltip-exit-done {
224
- opacity : 0 ;
225
- }
226
-
227
- @keyframes TooltipFadeIn {
228
- from {
229
- opacity : 0 ;
230
- }
231
-
232
- to {
233
- opacity : 1 ;
234
- }
235
- }
236
-
237
- @keyframes TooltipFadeOut {
238
- from {
239
- opacity : 1 ;
240
- }
241
-
242
- to {
243
- opacity : 0 ;
244
- }
225
+ .rw-tooltip-exit-active {
226
+ opacity : 0 ;
227
+ transition : opacity 200ms ;
245
228
}
246
229
247
230
```
0 commit comments