Skip to content

Commit 7f6ed4c

Browse files
docs: add css variables to "getting started"
1 parent 67a11e1 commit 7f6ed4c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/docs/getting-started.mdx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,4 +98,20 @@ import { Tooltip } from 'react-tooltip'
9898

9999
### Styling
100100

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).

0 commit comments

Comments
 (0)