playbook_ui_docs 13.32.0.pre.alpha.PLAY14143271 → 13.32.0.pre.alpha.PLAY14143288
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_dropdown/docs/_dropdown_default_value.html.erb +10 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx +31 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +2 -0
- data/app/pb_kits/playbook/pb_dropdown/docs/index.js +2 -1
- data/dist/playbook-doc.js +83 -83
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f14033d25185093809f123b76f10a331721f6c6ae3b564a285b341f1a212d74e
|
4
|
+
data.tar.gz: 4a6c994851f19a665da30da7d03969c75045f26c15c361e6342695f1b0911f9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 98f445b0f9eac6dd815510a92cb3e9e403056557a4ad86aef576fb456670227fd61725845cf67cdc221b17375a15fce77d985d16ae4798e8b8790b3594244ba4
|
7
|
+
data.tar.gz: 5775b0804049b39e46c9d02f915835966d71b14661f1c7ad0dacb08697b3fd7cce0353b8e83909fb7e4f89ab9ddaa6e65b67e00c92d1f6181b843b9bdb3322f2
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%
|
2
|
+
options = [
|
3
|
+
{ label: 'United States', value: 'United States', id: 'us' },
|
4
|
+
{ label: 'Canada', value: 'Canada', id: 'ca' },
|
5
|
+
{ label: 'Pakistan', value: 'Pakistan', id: 'pk' },
|
6
|
+
]
|
7
|
+
|
8
|
+
%>
|
9
|
+
|
10
|
+
<%= pb_rails("dropdown", props: {options: options, default_value: options.last}) %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import React from 'react'
|
2
|
+
import { Dropdown } from 'playbook-ui'
|
3
|
+
|
4
|
+
const DropdownDefaultValue = (props) => {
|
5
|
+
const options = [
|
6
|
+
{
|
7
|
+
label: "United States",
|
8
|
+
value: "United States",
|
9
|
+
},
|
10
|
+
{
|
11
|
+
label: "Canada",
|
12
|
+
value: "Canada",
|
13
|
+
},
|
14
|
+
{
|
15
|
+
label: "Pakistan",
|
16
|
+
value: "Pakistan",
|
17
|
+
}
|
18
|
+
];
|
19
|
+
|
20
|
+
return (
|
21
|
+
<>
|
22
|
+
<Dropdown
|
23
|
+
defaultValue={options[2]}
|
24
|
+
options={options}
|
25
|
+
{...props}
|
26
|
+
/>
|
27
|
+
</>
|
28
|
+
)
|
29
|
+
}
|
30
|
+
|
31
|
+
export default DropdownDefaultValue
|
@@ -8,6 +8,7 @@ examples:
|
|
8
8
|
- dropdown_with_custom_trigger_rails: Custom Trigger
|
9
9
|
- dropdown_with_custom_padding: Custom Option Padding
|
10
10
|
- dropdown_error: Dropdown with Error
|
11
|
+
- dropdown_default_value: Default Value
|
11
12
|
|
12
13
|
react:
|
13
14
|
- dropdown_default: Default
|
@@ -18,6 +19,7 @@ examples:
|
|
18
19
|
- dropdown_with_custom_trigger: Custom Trigger
|
19
20
|
- dropdown_with_custom_padding: Custom Option Padding
|
20
21
|
- dropdown_error: Dropdown with Error
|
22
|
+
- dropdown_default_value: Default Value
|
21
23
|
# - dropdown_with_autocomplete: Autocomplete
|
22
24
|
# - dropdown_with_autocomplete_and_custom_display: Autocomplete with Custom Display
|
23
25
|
# - dropdown_with_external_control: useDropdown Hook
|
@@ -9,4 +9,5 @@ export { default as DropdownWithLabel } from './_dropdown_with_label.jsx'
|
|
9
9
|
export { default as DropdownWithExternalControl } from './_dropdown_with_external_control.jsx'
|
10
10
|
export { default as DropdownWithHook } from './_dropdown_with_hook.jsx'
|
11
11
|
export { default as DropdownSubcomponentStructure } from './_dropdown_subcomponent_structure.jsx'
|
12
|
-
export { default as DropdownError } from './_dropdown_error.jsx'
|
12
|
+
export { default as DropdownError } from './_dropdown_error.jsx'
|
13
|
+
export { default as DropdownDefaultValue } from './_dropdown_default_value.jsx'
|