Popover positioning example
Browse files
docs/src/components/CodeSample.tsx
CHANGED
|
@@ -100,7 +100,6 @@ export function CodeSample(props: CodeSampleProps) {
|
|
| 100 |
<div id={id} className={className}>
|
| 101 |
{heading && <p className="text-lg -mt-0 font-medium text-black -mb-3 rounded-md">{heading}</p>}
|
| 102 |
{children && <div className="-mb-4">{children}</div>}
|
| 103 |
-
{!children && <div className="mb-1"></div>}
|
| 104 |
<button onClick={onClick} className="w-full rounded-md bg-black p-2 text-white">
|
| 105 |
{buttonText}
|
| 106 |
</button>
|
|
|
|
| 100 |
<div id={id} className={className}>
|
| 101 |
{heading && <p className="text-lg -mt-0 font-medium text-black -mb-3 rounded-md">{heading}</p>}
|
| 102 |
{children && <div className="-mb-4">{children}</div>}
|
|
|
|
| 103 |
<button onClick={onClick} className="w-full rounded-md bg-black p-2 text-white">
|
| 104 |
{buttonText}
|
| 105 |
</button>
|
docs/src/content/guides/popover-position.mdx
CHANGED
|
@@ -30,182 +30,184 @@ driverObj.highlight({
|
|
| 30 |
<p>Use the buttons below to show the popover.</p>
|
| 31 |
</div>
|
| 32 |
|
| 33 |
-
<
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
|
|
|
|
|
|
|
|
| 30 |
<p>Use the buttons below to show the popover.</p>
|
| 31 |
</div>
|
| 32 |
|
| 33 |
+
<div className="flex flex-wrap mt-3 gap-1 justify-start">
|
| 34 |
+
<CodeSample
|
| 35 |
+
buttonText={"Left Start"}
|
| 36 |
+
highlight={{
|
| 37 |
+
element: '#sample-box',
|
| 38 |
+
popover: {
|
| 39 |
+
title: 'Left Start Example',
|
| 40 |
+
description: 'We have side set to <mark>left</mark> and align set to <mark>start</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 41 |
+
side: "left",
|
| 42 |
+
align: 'start'
|
| 43 |
+
}
|
| 44 |
+
}}
|
| 45 |
+
id={"left-start"}
|
| 46 |
+
client:load
|
| 47 |
+
/>
|
| 48 |
+
|
| 49 |
+
<CodeSample
|
| 50 |
+
buttonText={"Left Center"}
|
| 51 |
+
highlight={{
|
| 52 |
+
element: '#sample-box',
|
| 53 |
+
popover: {
|
| 54 |
+
title: 'Left Center Example',
|
| 55 |
+
description: 'We have side set to <mark>left</mark> and align set to <mark>center</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 56 |
+
side: "left",
|
| 57 |
+
align: 'center'
|
| 58 |
+
}
|
| 59 |
+
}}
|
| 60 |
+
id={"left-start"}
|
| 61 |
+
client:load
|
| 62 |
+
/>
|
| 63 |
+
|
| 64 |
+
<CodeSample
|
| 65 |
+
buttonText={"Left End"}
|
| 66 |
+
highlight={{
|
| 67 |
+
element: '#sample-box',
|
| 68 |
+
popover: {
|
| 69 |
+
title: 'Left End Example',
|
| 70 |
+
description: 'We have side set to <mark>left</mark> and align set to <mark>end</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 71 |
+
side: "left",
|
| 72 |
+
align: 'end'
|
| 73 |
+
}
|
| 74 |
+
}}
|
| 75 |
+
id={"left-start"}
|
| 76 |
+
client:load
|
| 77 |
+
/>
|
| 78 |
+
|
| 79 |
+
<CodeSample
|
| 80 |
+
buttonText={"Top Start"}
|
| 81 |
+
highlight={{
|
| 82 |
+
element: '#sample-box',
|
| 83 |
+
popover: {
|
| 84 |
+
title: 'Top Start Example',
|
| 85 |
+
description: 'We have side set to <mark>top</mark> and align set to <mark>start</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 86 |
+
side: "top",
|
| 87 |
+
align: 'start'
|
| 88 |
+
}
|
| 89 |
+
}}
|
| 90 |
+
id={"top-start"}
|
| 91 |
+
client:load
|
| 92 |
+
/>
|
| 93 |
+
|
| 94 |
+
<CodeSample
|
| 95 |
+
buttonText={"Top Center"}
|
| 96 |
+
highlight={{
|
| 97 |
+
element: '#sample-box',
|
| 98 |
+
popover: {
|
| 99 |
+
title: 'Top Center Example',
|
| 100 |
+
description: 'We have side set to <mark>top</mark> and align set to <mark>center</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 101 |
+
side: "top",
|
| 102 |
+
align: 'center'
|
| 103 |
+
}
|
| 104 |
+
}}
|
| 105 |
+
id={"top-start"}
|
| 106 |
+
client:load
|
| 107 |
+
/>
|
| 108 |
+
|
| 109 |
+
<CodeSample
|
| 110 |
+
buttonText={"Top End"}
|
| 111 |
+
highlight={{
|
| 112 |
+
element: '#sample-box',
|
| 113 |
+
popover: {
|
| 114 |
+
title: 'Top End Example',
|
| 115 |
+
description: 'We have side set to <mark>top</mark> and align set to <mark>end</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 116 |
+
side: "top",
|
| 117 |
+
align: 'end'
|
| 118 |
+
}
|
| 119 |
+
}}
|
| 120 |
+
id={"top-start"}
|
| 121 |
+
client:load
|
| 122 |
+
/>
|
| 123 |
+
|
| 124 |
+
<CodeSample
|
| 125 |
+
buttonText={"Right Start"}
|
| 126 |
+
highlight={{
|
| 127 |
+
element: '#sample-box',
|
| 128 |
+
popover: {
|
| 129 |
+
title: 'Right Start Example',
|
| 130 |
+
description: 'We have side set to <mark>right</mark> and align set to <mark>start</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 131 |
+
side: "right",
|
| 132 |
+
align: 'start'
|
| 133 |
+
}
|
| 134 |
+
}}
|
| 135 |
+
id={"right-start"}
|
| 136 |
+
client:load
|
| 137 |
+
/>
|
| 138 |
+
|
| 139 |
+
<CodeSample
|
| 140 |
+
buttonText={"Right Center"}
|
| 141 |
+
highlight={{
|
| 142 |
+
element: '#sample-box',
|
| 143 |
+
popover: {
|
| 144 |
+
title: 'Right Center Example',
|
| 145 |
+
description: 'We have side set to <mark>right</mark> and align set to <mark>center</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 146 |
+
side: "right",
|
| 147 |
+
align: 'center'
|
| 148 |
+
}
|
| 149 |
+
}}
|
| 150 |
+
id={"right-start"}
|
| 151 |
+
client:load
|
| 152 |
+
/>
|
| 153 |
+
|
| 154 |
+
<CodeSample
|
| 155 |
+
buttonText={"Right End"}
|
| 156 |
+
highlight={{
|
| 157 |
+
element: '#sample-box',
|
| 158 |
+
popover: {
|
| 159 |
+
title: 'Right End Example',
|
| 160 |
+
description: 'We have side set to <mark>right</mark> and align set to <mark>end</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 161 |
+
side: "right",
|
| 162 |
+
align: 'end'
|
| 163 |
+
}
|
| 164 |
+
}}
|
| 165 |
+
id={"right-start"}
|
| 166 |
+
client:load
|
| 167 |
+
/>
|
| 168 |
+
|
| 169 |
+
<CodeSample
|
| 170 |
+
buttonText={"Bottom Start"}
|
| 171 |
+
highlight={{
|
| 172 |
+
element: '#sample-box',
|
| 173 |
+
popover: {
|
| 174 |
+
title: 'Bottom Start Example',
|
| 175 |
+
description: 'We have side set to <mark>bottom</mark> and align set to <mark>start</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 176 |
+
side: "bottom",
|
| 177 |
+
align: 'start'
|
| 178 |
+
}
|
| 179 |
+
}}
|
| 180 |
+
id={"bottom-start"}
|
| 181 |
+
client:load
|
| 182 |
+
/>
|
| 183 |
+
|
| 184 |
+
<CodeSample
|
| 185 |
+
buttonText={"Bottom Center"}
|
| 186 |
+
highlight={{
|
| 187 |
+
element: '#sample-box',
|
| 188 |
+
popover: {
|
| 189 |
+
title: 'Bottom Center Example',
|
| 190 |
+
description: 'We have side set to <mark>bottom</mark> and align set to <mark>center</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 191 |
+
side: "bottom",
|
| 192 |
+
align: 'center'
|
| 193 |
+
}
|
| 194 |
+
}}
|
| 195 |
+
id={"bottom-start"}
|
| 196 |
+
client:load
|
| 197 |
+
/>
|
| 198 |
+
|
| 199 |
+
<CodeSample
|
| 200 |
+
buttonText={"Bottom End"}
|
| 201 |
+
highlight={{
|
| 202 |
+
element: '#sample-box',
|
| 203 |
+
popover: {
|
| 204 |
+
title: 'Bottom End Example',
|
| 205 |
+
description: 'We have side set to <mark>bottom</mark> and align set to <mark>end</mark>. PS, we can use HTML in the title and descriptions of popover.',
|
| 206 |
+
side: "bottom",
|
| 207 |
+
align: 'end'
|
| 208 |
+
}
|
| 209 |
+
}}
|
| 210 |
+
id={"right-start"}
|
| 211 |
+
client:load
|
| 212 |
+
/>
|
| 213 |
+
</div>
|
docs/src/content/guides/tour-progress.mdx
CHANGED
|
@@ -45,6 +45,8 @@ Please note that `showProgress` is `false` by default. Also the default text for
|
|
| 45 |
```
|
| 46 |
</CodeSample>
|
| 47 |
|
|
|
|
|
|
|
| 48 |
<CodeSample
|
| 49 |
buttonText={"Different Progress Text"}
|
| 50 |
config={{
|
|
|
|
| 45 |
```
|
| 46 |
</CodeSample>
|
| 47 |
|
| 48 |
+
<div className="mb-1.5"></div>
|
| 49 |
+
|
| 50 |
<CodeSample
|
| 51 |
buttonText={"Different Progress Text"}
|
| 52 |
config={{
|