playbook_ui_docs 14.23.0.pre.alpha.PLAY2330removewalkthrough9176 → 14.23.0.pre.alpha.advancedtablefix9082
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate.html.erb +1 -1
- data/app/pb_kits/playbook/pb_checkbox/docs/_checkbox_indeterminate_rails.md +1 -2
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +0 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -1
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -3
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +1 -2
- data/app/pb_kits/playbook/pb_table/docs/_table_with_selectable_rows.html.erb +0 -1
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_continuous.jsx +69 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_default.jsx +71 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_multi_beacon.jsx +110 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_beacon.jsx +76 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_no_overlay.jsx +76 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/_walkthrough_styled.jsx +76 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/example.yml +10 -0
- data/app/pb_kits/playbook/pb_walkthrough/docs/index.js +6 -0
- data/dist/playbook-doc.js +2 -2
- metadata +10 -4
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options.jsx +0 -90
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_active_style_options_react.md +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: face0b80f1d5d9e0fb87ccc7cebcc7ef475bcc9d8145a351996b12411ec38617
|
4
|
+
data.tar.gz: 9fbf92d363ce40a13a78681df95530ad0272a61575375cc9fdb7e883cd8ebd2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ba7b40439c66ea7b7fa22eb6ef5bd3e09cd60cef1fda49c4f12dc526b6105ebeb7c7e35a1df0019e39ec9db2b038cd917688e7bd139f9eda6ef163cbb801c8c
|
7
|
+
data.tar.gz: c73cf9c7237f5c8b4500e63cc26ba019d75b4cbad1978b460cb7152495f797e3976687ff50ec048079365c9b5da294007def7a87dfb9240102f59b2d8c021389
|
@@ -9,10 +9,10 @@
|
|
9
9
|
<tr>
|
10
10
|
<th>
|
11
11
|
<%= pb_rails("checkbox", props: {
|
12
|
+
text: "Uncheck All",
|
12
13
|
value: "checkbox-value",
|
13
14
|
name: "main-checkbox",
|
14
15
|
indeterminate_main: true,
|
15
|
-
indeterminate_main_labels: ["Check All Ice Cream", "Uncheck All Ice Cream"],
|
16
16
|
id: "indeterminate-checkbox"
|
17
17
|
}) %>
|
18
18
|
</th>
|
@@ -1,2 +1 @@
|
|
1
|
-
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
2
|
-
If you want to customize the main checkbox labels, set an array `indeterminate_main_labels` with "Check All" and "Uncheck All" labels.
|
1
|
+
If you want to use indeterminate, "check/uncheck all" checkboxes, add `indeterminate_main: true` and an `id` to the main checkbox. Then, add an `indeterminate_parent` prop with the main checkbox's `id` to the children checkboxes.
|
@@ -18,7 +18,6 @@ const DropdownCustomRadioOptions = (props) => {
|
|
18
18
|
return (
|
19
19
|
<div>
|
20
20
|
<Dropdown
|
21
|
-
activeStyle={{ backgroundColor: "bg_light", fontColor: "text_lt_default" }}
|
22
21
|
label="Select Item"
|
23
22
|
onSelect={(selectedItem) => setSelectedValue(selectedItem?.value)}
|
24
23
|
options={options}
|
@@ -1 +1 @@
|
|
1
|
-
Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown.
|
1
|
+
Radio inputs can be used inside `Dropdown.Option` for a custom layout that mimics form-like selection within a dropdown.
|
@@ -16,7 +16,7 @@ examples:
|
|
16
16
|
- dropdown_with_search_rails: Custom Trigger Dropdown with Search
|
17
17
|
- dropdown_with_custom_padding: Custom Option Padding
|
18
18
|
- dropdown_with_custom_icon_options: Custom Icon Options
|
19
|
-
# - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in
|
19
|
+
# - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
|
20
20
|
- dropdown_error: Dropdown with Error
|
21
21
|
- dropdown_default_value: Default Value
|
22
22
|
- dropdown_multi_select_with_default: Multi Select Default Value
|
@@ -39,9 +39,8 @@ examples:
|
|
39
39
|
- dropdown_with_custom_trigger: Custom Trigger
|
40
40
|
- dropdown_with_search: Custom Trigger Dropdown with Search
|
41
41
|
- dropdown_with_custom_padding: Custom Option Padding
|
42
|
-
- dropdown_with_custom_active_style_options: Custom Active Style Options
|
43
42
|
- dropdown_with_custom_icon_options: Custom Icon Options
|
44
|
-
- dropdown_with_custom_radio_options: Custom Radio Options
|
43
|
+
# - dropdown_with_custom_radio_options: Custom Radio Options # TODO: Update and publish doc ex in [PLAY-2146](https://runway.powerhrg.com/backlog_items/PLAY-2146) (remove this comment afterwards)
|
45
44
|
- dropdown_error: Dropdown with Error
|
46
45
|
- dropdown_default_value: Default Value
|
47
46
|
- dropdown_multi_select_with_default: Multi Select Default Value
|
@@ -21,5 +21,4 @@ export { default as DropdownMultiSelectWithAutocomplete } from './_dropdown_mult
|
|
21
21
|
export { default as DropdownMultiSelectWithDefault } from './_dropdown_multi_select_with_default.jsx'
|
22
22
|
export { default as DropdownMultiSelectWithCustomOptions } from './_dropdown_multi_select_with_custom_options.jsx'
|
23
23
|
export {default as DropdownWithCustomIconOptions} from './_dropdown_with_custom_icon_options.jsx'
|
24
|
-
export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
|
25
|
-
export {default as DropdownWithCustomActiveStyleOptions} from './_dropdown_with_custom_active_style_options.jsx'
|
24
|
+
export {default as DropdownWithCustomRadioOptions} from './_dropdown_with_custom_radio_options.jsx'
|
@@ -0,0 +1,69 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughContinuous = (props) => {
|
6
|
+
const [state, setState] = useState({
|
7
|
+
run: false,
|
8
|
+
steps: [
|
9
|
+
{
|
10
|
+
title: 'Example Title',
|
11
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
12
|
+
target: '.examplePaused',
|
13
|
+
},
|
14
|
+
{
|
15
|
+
title: 'Toggle',
|
16
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
17
|
+
target: '.pb_toggle_control',
|
18
|
+
},
|
19
|
+
{
|
20
|
+
title: 'Top Nav',
|
21
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
22
|
+
target: '.pb--page--topNav',
|
23
|
+
},
|
24
|
+
],
|
25
|
+
})
|
26
|
+
|
27
|
+
return (
|
28
|
+
<div>
|
29
|
+
<div
|
30
|
+
className="examplePaused"
|
31
|
+
style={{ 'display': 'inline' }}
|
32
|
+
>
|
33
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
34
|
+
</div>
|
35
|
+
<br />
|
36
|
+
<br />
|
37
|
+
<Button
|
38
|
+
onClick={() => {
|
39
|
+
setState({ ...state,
|
40
|
+
run: true,
|
41
|
+
})
|
42
|
+
}}
|
43
|
+
>
|
44
|
+
{'Start Tour'}
|
45
|
+
</Button>
|
46
|
+
<br />
|
47
|
+
<br />
|
48
|
+
<Button
|
49
|
+
onClick={() => {
|
50
|
+
setState({
|
51
|
+
...state,
|
52
|
+
run: false,
|
53
|
+
})
|
54
|
+
}}
|
55
|
+
>
|
56
|
+
{'Reset/Stop Tour'}
|
57
|
+
</Button>
|
58
|
+
|
59
|
+
<Walkthrough
|
60
|
+
run={state.run}
|
61
|
+
steps={state.steps}
|
62
|
+
{...props}
|
63
|
+
continuous
|
64
|
+
/>
|
65
|
+
</div>
|
66
|
+
)
|
67
|
+
}
|
68
|
+
|
69
|
+
export default WalkthroughContinuous
|
@@ -0,0 +1,71 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughDefault = (props) => {
|
6
|
+
const [state, setState] = useState({
|
7
|
+
run: false,
|
8
|
+
steps: [
|
9
|
+
{
|
10
|
+
title: 'Example title',
|
11
|
+
content:
|
12
|
+
'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
|
13
|
+
target: '.example',
|
14
|
+
},
|
15
|
+
{
|
16
|
+
title: 'Toggle',
|
17
|
+
content:
|
18
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
19
|
+
target: '.pb_toggle_control',
|
20
|
+
},
|
21
|
+
{
|
22
|
+
title: 'Top Nav',
|
23
|
+
content:
|
24
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
25
|
+
target: '.pb--page--topNav',
|
26
|
+
},
|
27
|
+
],
|
28
|
+
})
|
29
|
+
|
30
|
+
return (
|
31
|
+
<div>
|
32
|
+
<div
|
33
|
+
className="example"
|
34
|
+
style={{ 'display': 'inline' }}
|
35
|
+
>
|
36
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
37
|
+
</div>
|
38
|
+
<br />
|
39
|
+
<br />
|
40
|
+
<Button
|
41
|
+
onClick={() => {
|
42
|
+
setState({ ...state,
|
43
|
+
run: true,
|
44
|
+
})
|
45
|
+
}}
|
46
|
+
>
|
47
|
+
{'Start Tour'}
|
48
|
+
</Button>
|
49
|
+
<br />
|
50
|
+
<br />
|
51
|
+
<Button
|
52
|
+
onClick={() => {
|
53
|
+
setState({
|
54
|
+
...state,
|
55
|
+
run: false,
|
56
|
+
})
|
57
|
+
}}
|
58
|
+
>
|
59
|
+
{'Reset/Stop Tour'}
|
60
|
+
</Button>
|
61
|
+
|
62
|
+
<Walkthrough
|
63
|
+
run={state.run}
|
64
|
+
steps={state.steps}
|
65
|
+
{...props}
|
66
|
+
/>
|
67
|
+
</div>
|
68
|
+
)
|
69
|
+
}
|
70
|
+
|
71
|
+
export default WalkthroughDefault
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughMultiBeacon = (props) => {
|
6
|
+
const [stateA, setStateA] = useState({
|
7
|
+
run: false,
|
8
|
+
steps: [
|
9
|
+
{
|
10
|
+
title: 'Example title',
|
11
|
+
content:
|
12
|
+
'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
|
13
|
+
target: '.exampleMulti',
|
14
|
+
},
|
15
|
+
],
|
16
|
+
})
|
17
|
+
|
18
|
+
const [stateB, setStateB] = useState({
|
19
|
+
run: false,
|
20
|
+
steps: [
|
21
|
+
{
|
22
|
+
title: 'Toggle',
|
23
|
+
content:
|
24
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
25
|
+
target: '.pb_toggle_control',
|
26
|
+
},
|
27
|
+
],
|
28
|
+
})
|
29
|
+
|
30
|
+
const [stateC, setStateC] = useState({
|
31
|
+
run: false,
|
32
|
+
steps: [
|
33
|
+
{
|
34
|
+
title: 'Top Nav',
|
35
|
+
content:
|
36
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
37
|
+
target: '.pb--page--topNav',
|
38
|
+
},
|
39
|
+
],
|
40
|
+
})
|
41
|
+
|
42
|
+
return (
|
43
|
+
<div>
|
44
|
+
<div
|
45
|
+
className="exampleMulti"
|
46
|
+
style={{ 'display': 'inline' }}
|
47
|
+
>
|
48
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
49
|
+
</div>
|
50
|
+
<br />
|
51
|
+
<br />
|
52
|
+
<Button
|
53
|
+
onClick={() => {
|
54
|
+
setStateA({
|
55
|
+
...stateA,
|
56
|
+
run: true,
|
57
|
+
})
|
58
|
+
setStateB({
|
59
|
+
...stateB,
|
60
|
+
run: true,
|
61
|
+
})
|
62
|
+
setStateC({
|
63
|
+
...stateC,
|
64
|
+
run: true,
|
65
|
+
})
|
66
|
+
}}
|
67
|
+
>
|
68
|
+
{'Start Tour'}
|
69
|
+
</Button>
|
70
|
+
<br />
|
71
|
+
<br />
|
72
|
+
<Button
|
73
|
+
onClick={() => {
|
74
|
+
setStateA({
|
75
|
+
...stateA,
|
76
|
+
run: false,
|
77
|
+
})
|
78
|
+
setStateB({
|
79
|
+
...stateB,
|
80
|
+
run: false,
|
81
|
+
})
|
82
|
+
setStateC({
|
83
|
+
...stateC,
|
84
|
+
run: false,
|
85
|
+
})
|
86
|
+
}}
|
87
|
+
>
|
88
|
+
{'Reset/Stop Tour'}
|
89
|
+
</Button>
|
90
|
+
|
91
|
+
<Walkthrough
|
92
|
+
run={stateA.run}
|
93
|
+
steps={stateA.steps}
|
94
|
+
{...props}
|
95
|
+
/>
|
96
|
+
<Walkthrough
|
97
|
+
run={stateB.run}
|
98
|
+
steps={stateB.steps}
|
99
|
+
{...props}
|
100
|
+
/>
|
101
|
+
<Walkthrough
|
102
|
+
run={stateC.run}
|
103
|
+
steps={stateC.steps}
|
104
|
+
{...props}
|
105
|
+
/>
|
106
|
+
</div>
|
107
|
+
)
|
108
|
+
}
|
109
|
+
|
110
|
+
export default WalkthroughMultiBeacon
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughNoBeacon = (props) => {
|
6
|
+
const [state, setState] = useState({
|
7
|
+
callback: (data) => {
|
8
|
+
if (data.action === 'close' && data.type === 'step:after') {
|
9
|
+
// This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
|
10
|
+
setState({ ...state, run: false })
|
11
|
+
}
|
12
|
+
},
|
13
|
+
run: false,
|
14
|
+
steps: [
|
15
|
+
{
|
16
|
+
title: 'Example Title',
|
17
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
18
|
+
target: '.exampleNoBeacon',
|
19
|
+
disableBeacon: true,
|
20
|
+
},
|
21
|
+
{
|
22
|
+
title: 'Toggle',
|
23
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
24
|
+
target: '.pb_toggle_control',
|
25
|
+
},
|
26
|
+
{
|
27
|
+
title: 'Top Nav',
|
28
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
29
|
+
target: '.pb--page--topNav',
|
30
|
+
},
|
31
|
+
],
|
32
|
+
})
|
33
|
+
|
34
|
+
return (
|
35
|
+
<div>
|
36
|
+
<div
|
37
|
+
className="exampleNoBeacon"
|
38
|
+
style={{ 'display': 'inline' }}
|
39
|
+
>
|
40
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
41
|
+
</div>
|
42
|
+
<br />
|
43
|
+
<br />
|
44
|
+
<Button
|
45
|
+
onClick={() => {
|
46
|
+
setState({ ...state,
|
47
|
+
run: true,
|
48
|
+
})
|
49
|
+
}}
|
50
|
+
>
|
51
|
+
{'Start Tour'}
|
52
|
+
</Button>
|
53
|
+
<br />
|
54
|
+
<br />
|
55
|
+
<Button
|
56
|
+
onClick={() => {
|
57
|
+
setState({
|
58
|
+
...state,
|
59
|
+
run: false,
|
60
|
+
})
|
61
|
+
}}
|
62
|
+
>
|
63
|
+
{'Reset/Stop Tour'}
|
64
|
+
</Button>
|
65
|
+
|
66
|
+
<Walkthrough
|
67
|
+
run={state.run}
|
68
|
+
steps={state.steps}
|
69
|
+
{...props}
|
70
|
+
continuous
|
71
|
+
/>
|
72
|
+
</div>
|
73
|
+
)
|
74
|
+
}
|
75
|
+
|
76
|
+
export default WalkthroughNoBeacon
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughNoOverlay = (props) => {
|
6
|
+
const [noOverlay, setNoOverlayState] = useState({
|
7
|
+
callback: (data) => {
|
8
|
+
if (data.action === 'close' && data.type === 'step:after') {
|
9
|
+
// This explicitly stops the tour (otherwise it displays a "beacon" to resume the tour)
|
10
|
+
setNoOverlayState({ ...noOverlay, run: false })
|
11
|
+
}
|
12
|
+
},
|
13
|
+
disableOverlay: true,
|
14
|
+
run: false,
|
15
|
+
steps: [
|
16
|
+
{
|
17
|
+
title: 'Example Title',
|
18
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
19
|
+
target: '.exampleNoOverlay',
|
20
|
+
},
|
21
|
+
{
|
22
|
+
title: 'Toggle',
|
23
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
24
|
+
target: '.pb_toggle_control',
|
25
|
+
},
|
26
|
+
{
|
27
|
+
title: 'Top Nav',
|
28
|
+
content: 'Setting the prop - continuous allows the next button to appear and lets the user move to the next step by pressing the next button instead of the beacon',
|
29
|
+
target: '.pb--page--topNav',
|
30
|
+
},
|
31
|
+
],
|
32
|
+
})
|
33
|
+
|
34
|
+
return (
|
35
|
+
<div>
|
36
|
+
<div
|
37
|
+
className="exampleNoOverlay"
|
38
|
+
style={{ 'display': 'inline' }}
|
39
|
+
>
|
40
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
41
|
+
</div>
|
42
|
+
<br />
|
43
|
+
<br />
|
44
|
+
<Button
|
45
|
+
onClick={() => {
|
46
|
+
setNoOverlayState({ ...noOverlay,
|
47
|
+
run: true,
|
48
|
+
})
|
49
|
+
}}
|
50
|
+
>
|
51
|
+
{'Start Tour'}
|
52
|
+
</Button>
|
53
|
+
<br />
|
54
|
+
<br />
|
55
|
+
<Button
|
56
|
+
onClick={() => {
|
57
|
+
setNoOverlayState({
|
58
|
+
...noOverlay,
|
59
|
+
run: false,
|
60
|
+
})
|
61
|
+
}}
|
62
|
+
>
|
63
|
+
{'Reset/Stop Tour'}
|
64
|
+
</Button>
|
65
|
+
|
66
|
+
<Walkthrough
|
67
|
+
disableOverlay
|
68
|
+
run={noOverlay.run}
|
69
|
+
steps={noOverlay.steps}
|
70
|
+
{...props}
|
71
|
+
/>
|
72
|
+
</div>
|
73
|
+
)
|
74
|
+
}
|
75
|
+
|
76
|
+
export default WalkthroughNoOverlay
|
@@ -0,0 +1,76 @@
|
|
1
|
+
import React, { useState } from 'react'
|
2
|
+
import Button from '../../pb_button/_button'
|
3
|
+
import Walkthrough from '../../pb_walkthrough/_walkthrough'
|
4
|
+
|
5
|
+
const WalkthroughStyled = (props) => {
|
6
|
+
const [state, setState] = useState({
|
7
|
+
run: false,
|
8
|
+
steps: [
|
9
|
+
{
|
10
|
+
title: 'Example title',
|
11
|
+
content:
|
12
|
+
'This was an example of a Beacon in the Walkthrough Kit it is used as a simple indicator to inform users about a particular thing',
|
13
|
+
target: '.styled',
|
14
|
+
},
|
15
|
+
{
|
16
|
+
title: 'Toggle',
|
17
|
+
content:
|
18
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
19
|
+
target: '.pb_toggle_control',
|
20
|
+
},
|
21
|
+
{
|
22
|
+
title: 'Top Nav',
|
23
|
+
content:
|
24
|
+
'By default the walkthrough kit will cycle through each step provided.',
|
25
|
+
target: '.pb--page--topNav',
|
26
|
+
},
|
27
|
+
],
|
28
|
+
})
|
29
|
+
|
30
|
+
return (
|
31
|
+
<div>
|
32
|
+
<div
|
33
|
+
className="styled"
|
34
|
+
style={{ 'display': 'inline' }}
|
35
|
+
>
|
36
|
+
{'Start the Tour. Then click the Beacon to demo the default behavior of the Walkthrough Kit'}
|
37
|
+
</div>
|
38
|
+
<br />
|
39
|
+
<br />
|
40
|
+
<Button
|
41
|
+
onClick={() => {
|
42
|
+
setState({ ...state,
|
43
|
+
run: true,
|
44
|
+
})
|
45
|
+
}}
|
46
|
+
>
|
47
|
+
{'Start Tour'}
|
48
|
+
</Button>
|
49
|
+
<br />
|
50
|
+
<br />
|
51
|
+
<Button
|
52
|
+
onClick={() => {
|
53
|
+
setState({
|
54
|
+
...state,
|
55
|
+
run: false,
|
56
|
+
})
|
57
|
+
}}
|
58
|
+
>
|
59
|
+
{'Reset/Stop Tour'}
|
60
|
+
</Button>
|
61
|
+
|
62
|
+
<Walkthrough
|
63
|
+
run={state.run}
|
64
|
+
steps={state.steps}
|
65
|
+
styles={{
|
66
|
+
options: {
|
67
|
+
beaconSize: 120,
|
68
|
+
},
|
69
|
+
}}
|
70
|
+
{...props}
|
71
|
+
/>
|
72
|
+
</div>
|
73
|
+
)
|
74
|
+
}
|
75
|
+
|
76
|
+
export default WalkthroughStyled
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export { default as WalkthroughDefault } from './_walkthrough_default.jsx'
|
2
|
+
export { default as WalkthroughContinuous } from './_walkthrough_continuous.jsx'
|
3
|
+
export { default as WalkthroughNoBeacon } from './_walkthrough_no_beacon.jsx'
|
4
|
+
export { default as WalkthroughMultiBeacon } from './_walkthrough_multi_beacon.jsx'
|
5
|
+
export { default as WalkthroughNoOverlay } from './_walkthrough_no_overlay.jsx'
|
6
|
+
export { default as WalkthroughStyled } from './_walkthrough_styled.jsx'
|