Add styling popover content
Browse files
docs/src/content/guides/popover-position.mdx
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
title: "Popover Position"
|
3 |
groupTitle: "Examples"
|
4 |
-
sort:
|
5 |
---
|
6 |
|
7 |
import { CodeSample } from "../../components/CodeSample.tsx";
|
|
|
1 |
---
|
2 |
title: "Popover Position"
|
3 |
groupTitle: "Examples"
|
4 |
+
sort: 7
|
5 |
---
|
6 |
|
7 |
import { CodeSample } from "../../components/CodeSample.tsx";
|
docs/src/content/guides/styling-overlay.mdx
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
---
|
2 |
title: "Styling Overlay"
|
3 |
groupTitle: "Examples"
|
4 |
-
sort:
|
5 |
---
|
6 |
|
7 |
import { CodeSample } from "../../components/CodeSample.tsx";
|
|
|
1 |
---
|
2 |
title: "Styling Overlay"
|
3 |
groupTitle: "Examples"
|
4 |
+
sort: 5
|
5 |
---
|
6 |
|
7 |
import { CodeSample } from "../../components/CodeSample.tsx";
|
docs/src/content/guides/styling-popover.mdx
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: "Styling Popover"
|
3 |
+
groupTitle: "Examples"
|
4 |
+
sort: 10
|
5 |
+
---
|
6 |
+
|
7 |
+
import { CodeSample } from "../../components/CodeSample.tsx";
|
8 |
+
|
9 |
+
You can either use the default class names and override the styles or you can pass a custom class name to the `popoverClass` option either globally or per step.
|
10 |
+
|
11 |
+
Alternatively, if want to modify the Popover DOM, you can use the `onPopoverRendered` callback to get the popover DOM element and do whatever you want with it.
|
12 |
+
|
13 |
+
We have added a few examples below but have a look at the [theming section](/docs/theming#styling-popover) for detailed guide including class names to target etc.
|
14 |
+
|
15 |
+
## Using CSS
|
16 |
+
|
17 |
+
Here are some driver.js examples with different overlay colors.
|
18 |
+
|
19 |
+
```js
|
20 |
+
import { driver } from "driver.js";
|
21 |
+
import "driver.js/dist/driver.css";
|
22 |
+
|
23 |
+
const driverObj = driver();
|
24 |
+
|
25 |
+
driverObj.highlight({
|
26 |
+
popover: {
|
27 |
+
title: 'Pass any RGB Color',
|
28 |
+
description: 'Here we have set the overlay color to be blue. You can pass any RGB color to overlayColor option.'
|
29 |
+
}
|
30 |
+
});
|
31 |
+
```
|
32 |
+
|
33 |
+
<div className='flex flex-col gap-1 -mt-5'>
|
34 |
+
<CodeSample
|
35 |
+
buttonText={"Red Color"}
|
36 |
+
config={{
|
37 |
+
overlayColor: 'red',
|
38 |
+
overlayOpacity: 0.3
|
39 |
+
}}
|
40 |
+
highlight={{
|
41 |
+
popover: {
|
42 |
+
title: 'Pass any RGB Color',
|
43 |
+
description: 'Here we have set the overlay color to be blue. You can pass any RGB color to overlayColor option.',
|
44 |
+
}
|
45 |
+
}}
|
46 |
+
id={"left-start"}
|
47 |
+
client:load
|
48 |
+
/>
|
49 |
+
</div>
|