File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -98,4 +98,20 @@ import { Tooltip } from 'react-tooltip'
98
98
99
99
### Styling
100
100
101
- If you want a styled tooltip, don't forget to add the style file ` import 'react-tooltip/dist/react-tooltip.css `
101
+ If you want a styled tooltip, don't forget to add the style file ` import 'react-tooltip/dist/react-tooltip.css ` .
102
+
103
+ Basic styling can be done by overriding the following css variables.
104
+
105
+ ``` css
106
+ :root {
107
+ --rt-color-white : #fff ;
108
+ --rt-color-dark : #222 ;
109
+ --rt-color-success : #8dc572 ;
110
+ --rt-color-error : #be6464 ;
111
+ --rt-color-warning : #f0ad4e ;
112
+ --rt-color-info : #337ab7 ;
113
+ --rt-opacity : 0.9 ;
114
+ }
115
+ ```
116
+
117
+ For advanced styling, check [ the examples] ( ./examples/styling.mdx ) .
Original file line number Diff line number Diff line change 31
31
32
32
.show {
33
33
visibility : visible;
34
- opacity : 0.9 ;
34
+ opacity : var ( --rt-opacity ) ;
35
35
}
36
36
37
37
/** Types variant **/
Original file line number Diff line number Diff line change 5
5
--rt-color-error : # be6464 ;
6
6
--rt-color-warning : # f0ad4e ;
7
7
--rt-color-info : # 337ab7 ;
8
+ --rt-opacity : 0.9 ;
8
9
}
You can’t perform that action at this time.
0 commit comments