playbook_ui_docs 14.22.0.pre.rc.4 β†’ 14.22.0.pre.rc.5

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.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows.jsx +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_pinned_rows_react.md +5 -3
  4. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.jsx +64 -0
  5. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_row_styling.md +7 -0
  6. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -0
  7. data/app/pb_kits/playbook/pb_advanced_table/docs/index.js +1 -0
  8. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.html.erb +3 -3
  9. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_blank_selection.jsx +7 -4
  10. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_clear_selection.jsx +6 -3
  11. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default.jsx +6 -3
  12. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_rails.html.erb +3 -3
  13. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.html.erb +3 -3
  14. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_default_value.jsx +7 -4
  15. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.html.erb +3 -3
  16. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_error.jsx +7 -4
  17. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select.jsx +19 -10
  18. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display.jsx +19 -10
  19. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_display_rails.html.erb +10 -10
  20. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_rails.html.erb +10 -10
  21. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.html.erb +10 -10
  22. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_autocomplete.jsx +20 -11
  23. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.html.erb +3 -3
  24. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_custom_options.jsx +8 -8
  25. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.html.erb +10 -10
  26. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_multi_select_with_default.jsx +23 -14
  27. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.html.erb +3 -3
  28. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_separators_hidden.jsx +6 -3
  29. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure.jsx +6 -3
  30. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subcomponent_structure_rails.html.erb +3 -3
  31. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.html.erb +3 -3
  32. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_subtle_variant.jsx +6 -3
  33. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.html.erb +3 -3
  34. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete.jsx +3 -3
  35. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.html.erb +4 -4
  36. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_autocomplete_with_subcomponents.jsx +4 -4
  37. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display.jsx +4 -4
  38. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_display_rails.html.erb +4 -4
  39. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.html.erb +52 -0
  40. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options.jsx +99 -0
  41. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_rails.md +1 -0
  42. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_icon_options_react.md +1 -0
  43. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options.jsx +3 -3
  44. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_options_rails.html.erb +3 -3
  45. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.html.erb +3 -3
  46. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_padding.jsx +3 -3
  47. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.html.erb +28 -0
  48. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options.jsx +47 -0
  49. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_rails.md +1 -0
  50. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_radio_options_react.md +1 -0
  51. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger.jsx +3 -3
  52. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_custom_trigger_rails.html.erb +3 -3
  53. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_external_control.jsx +3 -3
  54. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.html.erb +3 -3
  55. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_label.jsx +6 -3
  56. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search.jsx +3 -3
  57. data/app/pb_kits/playbook/pb_dropdown/docs/_dropdown_with_search_rails.html.erb +3 -3
  58. data/app/pb_kits/playbook/pb_dropdown/docs/example.yml +4 -0
  59. data/app/pb_kits/playbook/pb_dropdown/docs/index.js +3 -1
  60. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns.html.erb +8 -8
  61. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_columns_rails.md +1 -1
  62. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns.html.erb +12 -12
  63. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_left_columns_rails.md +2 -2
  64. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns.html.erb +12 -12
  65. data/app/pb_kits/playbook/pb_table/docs/_table_sticky_right_columns_rails.md +2 -2
  66. data/dist/playbook-doc.js +1 -1
  67. metadata +12 -2
@@ -1,15 +1,15 @@
1
1
  <%
2
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
- { label: 'India', value: 'India', id: 'in' },
7
- { label: 'United Kingdom', value: 'United Kingdom', id: 'uk' },
8
- { label: 'Australia', value: 'Australia', id: 'au' },
9
- { label: 'New Zealand', value: 'New Zealand', id: 'nz' },
10
- { label: 'Germany', value: 'Germany', id: 'de' },
11
- { label: 'France', value: 'France', id: 'fr' },
12
- { label: 'Italy', value: 'Italy', id: 'it' },
3
+ { label: 'United States', value: 'unitedsStates', id: 'us' },
4
+ { label: 'Canada', value: 'canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
+ { label: 'India', value: 'india', id: 'in' },
7
+ { label: 'United Kingdom', value: 'unitedKingdom', id: 'uk' },
8
+ { label: 'Australia', value: 'australia', id: 'au' },
9
+ { label: 'New Zealand', value: 'newZealand', id: 'nz' },
10
+ { label: 'Germany', value: 'germany', id: 'de' },
11
+ { label: 'France', value: 'france', id: 'fr' },
12
+ { label: 'Italy', value: 'italy', id: 'it' },
13
13
  ]
14
14
  %>
15
15
 
@@ -5,50 +5,59 @@ const DropdownMultiSelectWithDefault = (props) => {
5
5
  const options = [
6
6
  {
7
7
  label: "United States",
8
- value: "United States",
8
+ value: "unitedStates",
9
+ id: "us"
9
10
  },
10
11
  {
11
12
  label: "United Kingdom",
12
- value: "United Kingdom",
13
- },
13
+ value: "unitedKingdom",
14
+ id: "gb"
15
+ },
14
16
  {
15
17
  label: "Canada",
16
- value: "Canada",
18
+ value: "canada",
19
+ id: "ca"
17
20
  },
18
21
  {
19
22
  label: "Pakistan",
20
- value: "Pakistan",
23
+ value: "pakistan",
24
+ id: "pk"
21
25
  },
22
26
  {
23
27
  label: "India",
24
- value: "India",
28
+ value: "india",
29
+ id: "in"
25
30
  },
26
31
  {
27
32
  label: "Australia",
28
- value: "Australia",
33
+ value: "australia",
34
+ id: "au"
29
35
  },
30
36
  {
31
37
  label: "New Zealand",
32
- value: "New Zealand",
38
+ value: "new Zealand",
39
+ id: "nz"
33
40
  },
34
41
  {
35
42
  label: "Italy",
36
- value: "Italy",
43
+ value: "italy",
44
+ id: "it"
37
45
  },
38
46
  {
39
47
  label: "Spain",
40
- value: "Spain",
41
- },
42
- ];
48
+ value: "spain",
49
+ id: "es"
50
+ }
51
+ ];
43
52
 
44
53
  const defaultSelectedOptions = [
45
54
  {
46
55
  label: "United States",
47
- value: "United States",
56
+ value: "unitedStates",
48
57
  },
49
58
  {
50
59
  label: "Italy",
51
- value: "Italy",
60
+ value: "italy",
52
61
  },
53
62
  ];
54
63
 
@@ -1,8 +1,8 @@
1
1
  <%
2
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' },
3
+ { label: 'United States', value: 'unitedStates', id: 'us' },
4
+ { label: 'Canada', value: 'canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -6,15 +6,18 @@ const DropdownSeparatorsHidden = (props) => {
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "United States",
9
+ value: "unitedStates",
10
+ id: "us"
10
11
  },
11
12
  {
12
13
  label: "Canada",
13
- value: "Canada",
14
+ value: "canada",
15
+ id: "ca"
14
16
  },
15
17
  {
16
18
  label: "Pakistan",
17
- value: "Pakistan",
19
+ value: "pakistan",
20
+ id: "pk"
18
21
  }
19
22
  ];
20
23
 
@@ -7,15 +7,18 @@ const DropdownSubcomponentStructure = (props) => {
7
7
  const options = [
8
8
  {
9
9
  label: "United States",
10
- value: "United States",
10
+ value: "unitedStates",
11
+ id: "us"
11
12
  },
12
13
  {
13
14
  label: "Canada",
14
- value: "Canada",
15
+ value: "canada",
16
+ id: "ca"
15
17
  },
16
18
  {
17
19
  label: "Pakistan",
18
- value: "Pakistan",
20
+ value: "pakistan",
21
+ id: "pk"
19
22
  }
20
23
  ];
21
24
 
@@ -1,8 +1,8 @@
1
1
  <%
2
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' },
3
+ { label: 'United States', value: 'unitedStates', id: 'us' },
4
+ { label: 'Canada', value: 'canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -1,8 +1,8 @@
1
1
  <%
2
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' },
3
+ { label: 'United States', value: 'unitedStates', id: 'us' },
4
+ { label: 'Canada', value: 'canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -6,15 +6,18 @@ const DropdownSubtleVariant = (props) => {
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "United States",
9
+ value: "unitedStates",
10
+ id: "us"
10
11
  },
11
12
  {
12
13
  label: "Canada",
13
- value: "Canada",
14
+ value: "canada",
15
+ id: "ca"
14
16
  },
15
17
  {
16
18
  label: "Pakistan",
17
- value: "Pakistan",
19
+ value: "pakistan",
20
+ id: "pk"
18
21
  }
19
22
  ];
20
23
 
@@ -2,21 +2,21 @@
2
2
  options = [
3
3
  {
4
4
  label: "United States",
5
- value: "United States",
5
+ value: "unitedStates",
6
6
  areaCode: "+1",
7
7
  icon: "πŸ‡ΊπŸ‡Έ",
8
8
  id: "us"
9
9
  },
10
10
  {
11
11
  label: "United Kingdom",
12
- value: "United Kingdom",
12
+ value: "unitedKingdom",
13
13
  areaCode: "+44",
14
14
  icon: "πŸ‡¬πŸ‡§",
15
15
  id: "gb"
16
16
  },
17
17
  {
18
18
  label: "Pakistan",
19
- value: "Pakistan",
19
+ value: "pakistan",
20
20
  areaCode: "+92",
21
21
  icon: "πŸ‡΅πŸ‡°",
22
22
  id: "pk"
@@ -7,21 +7,21 @@ const DropdownWithAutocomplete = (props) => {
7
7
  const options = [
8
8
  {
9
9
  label: "United States",
10
- value: "United States",
10
+ value: "unitedStates",
11
11
  areaCode: "+1",
12
12
  icon: "πŸ‡ΊπŸ‡Έ",
13
13
  id: "us"
14
14
  },
15
15
  {
16
16
  label: "United Kingdom",
17
- value: "United Kingdom",
17
+ value: "unitedKingdom",
18
18
  areaCode: "+44",
19
19
  icon: "πŸ‡¬πŸ‡§",
20
20
  id: "gb"
21
21
  },
22
22
  {
23
23
  label: "Pakistan",
24
- value: "Pakistan",
24
+ value: "pakistan",
25
25
  areaCode: "+92",
26
26
  icon: "πŸ‡΅πŸ‡°",
27
27
  id: "pk"
@@ -2,7 +2,7 @@
2
2
  options = [
3
3
  {
4
4
  label: "Jasper Furniss",
5
- value: "Jasper Furniss",
5
+ value: "jasperFurniss",
6
6
  territory: "PHL",
7
7
  title: "Lead UX Engineer",
8
8
  id: "jasper-furniss",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  {
12
12
  label: "Ramon Ruiz",
13
- value: "Ramon Ruiz",
13
+ value: "ramonRuiz",
14
14
  territory: "PHL",
15
15
  title: "Senior UX Designer",
16
16
  id: "ramon-ruiz",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  label: "Carlos Lima",
21
- value: "Carlos Lima",
21
+ value: "carlosLima",
22
22
  territory: "PHL",
23
23
  title: "Nitro Developer",
24
24
  id: "carlos-lima",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
- value: "Courtney Long",
29
+ value: "courtneyLong",
30
30
  territory: "PHL",
31
31
  title: "Lead UX Designer",
32
32
  id: "courtney-long",
@@ -11,7 +11,7 @@ const DropdownWithAutocompleteWithSubcomponents = (props) => {
11
11
  const options = [
12
12
  {
13
13
  label: "Jasper Furniss",
14
- value: "Jasper Furniss",
14
+ value: "jasperFurniss",
15
15
  territory: "PHL",
16
16
  title: "Lead UX Engineer",
17
17
  id: "jasper-furniss",
@@ -19,7 +19,7 @@ const DropdownWithAutocompleteWithSubcomponents = (props) => {
19
19
  },
20
20
  {
21
21
  label: "Ramon Ruiz",
22
- value: "Ramon Ruiz",
22
+ value: "ramonRuiz",
23
23
  territory: "PHL",
24
24
  title: "Senior UX Designer",
25
25
  id: "ramon-ruiz",
@@ -27,7 +27,7 @@ const DropdownWithAutocompleteWithSubcomponents = (props) => {
27
27
  },
28
28
  {
29
29
  label: "Carlos Lima",
30
- value: "Carlos Lima",
30
+ value: "carlosLima",
31
31
  territory: "PHL",
32
32
  title: "Nitro Developer",
33
33
  id: "carlos-lima",
@@ -35,7 +35,7 @@ const DropdownWithAutocompleteWithSubcomponents = (props) => {
35
35
  },
36
36
  {
37
37
  label: "Courtney Long",
38
- value: "Courtney Long",
38
+ value: "courtneyLong",
39
39
  territory: "PHL",
40
40
  title: "Lead UX Designer",
41
41
  id: "courtney-long",
@@ -14,7 +14,7 @@ const DropdownWithCustomDisplay = (props) => {
14
14
  const options = [
15
15
  {
16
16
  label: "Jasper Furniss",
17
- value: "Jasper Furniss",
17
+ value: "jasperFurniss",
18
18
  territory: "PHL",
19
19
  title: "Lead UX Engineer",
20
20
  id: "jasper-furniss",
@@ -22,7 +22,7 @@ const DropdownWithCustomDisplay = (props) => {
22
22
  },
23
23
  {
24
24
  label: "Ramon Ruiz",
25
- value: "Ramon Ruiz",
25
+ value: "ramonRuiz",
26
26
  territory: "PHL",
27
27
  title: "Senior UX Designer",
28
28
  id: "ramon-ruiz",
@@ -30,7 +30,7 @@ const DropdownWithCustomDisplay = (props) => {
30
30
  },
31
31
  {
32
32
  label: "Carlos Lima",
33
- value: "Carlos Lima",
33
+ value: "carlosLima",
34
34
  territory: "PHL",
35
35
  title: "Nitro Developer",
36
36
  id: "carlos-lima",
@@ -38,7 +38,7 @@ const DropdownWithCustomDisplay = (props) => {
38
38
  },
39
39
  {
40
40
  label: "Courtney Long",
41
- value: "Courtney Long",
41
+ value: "courtneyLong",
42
42
  territory: "PHL",
43
43
  title: "Lead UX Designer",
44
44
  id: "courtney-long",
@@ -2,7 +2,7 @@
2
2
  options = [
3
3
  {
4
4
  label: "Jasper Furniss",
5
- value: "Jasper Furniss",
5
+ value: "jasperFurniss",
6
6
  territory: "PHL",
7
7
  title: "Lead UX Engineer",
8
8
  id: "jasper-furniss",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  {
12
12
  label: "Ramon Ruiz",
13
- value: "Ramon Ruiz",
13
+ value: "ramonRuiz",
14
14
  territory: "PHL",
15
15
  title: "Senior UX Designer",
16
16
  id: "ramon-ruiz",
@@ -18,7 +18,7 @@
18
18
  },
19
19
  {
20
20
  label: "Carlos Lima",
21
- value: "Carlos Lima",
21
+ value: "carlosLima",
22
22
  territory: "PHL",
23
23
  title: "Nitro Developer",
24
24
  id: "carlos-lima",
@@ -26,7 +26,7 @@
26
26
  },
27
27
  {
28
28
  label: "Courtney Long",
29
- value: "Courtney Long",
29
+ value: "courtneyLong",
30
30
  territory: "PHL",
31
31
  title: "Lead UX Designer",
32
32
  id: "courtney-long",
@@ -0,0 +1,52 @@
1
+ <%
2
+ options = [
3
+ { label: "Item 1", value: "item-1", id: "1" },
4
+ { label: "Item 2", value: "item-2", id: "2" },
5
+ { label: "Item 3", value: "item-3", id: "3" }
6
+ ]
7
+ %>
8
+
9
+ <%= pb_rails("dropdown", props: { label: "Multiple Icons", options: options }) do %>
10
+ <%= pb_rails("dropdown/dropdown_trigger") %>
11
+ <%= pb_rails("dropdown/dropdown_container") do %>
12
+ <% options.each do |option| %>
13
+ <%= pb_rails("dropdown/dropdown_option", props: { option: option }) do %>
14
+ <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
15
+ <%= pb_rails("flex") do %>
16
+ <%= pb_rails("icon", props: { icon: "calendar", padding_right: "xs" }) %>
17
+ <%= pb_rails("body", props: { color: "default", text: option[:label] }) %>
18
+ <% end %>
19
+ <%= pb_rails("icon", props: { icon: "check" }) %>
20
+ <% end %>
21
+ <% end %>
22
+ <% end %>
23
+ <% end %>
24
+ <% end %>
25
+
26
+ <%= pb_rails("dropdown", props: { label: "Icon on Left", options: options, padding_y: "md" }) do %>
27
+ <%= pb_rails("dropdown/dropdown_trigger") %>
28
+ <%= pb_rails("dropdown/dropdown_container") do %>
29
+ <% options.each do |option| %>
30
+ <%= pb_rails("dropdown/dropdown_option", props: { option: option }) do %>
31
+ <%= pb_rails("flex", props: { align: "center" }) do %>
32
+ <%= pb_rails("icon", props: { icon: "calendar", padding_right: "xs" }) %>
33
+ <%= pb_rails("body", props: { color: "default", text: option[:label] }) %>
34
+ <% end %>
35
+ <% end %>
36
+ <% end %>
37
+ <% end %>
38
+ <% end %>
39
+
40
+ <%= pb_rails("dropdown", props: { label: "Icon on Right", options: options }) do %>
41
+ <%= pb_rails("dropdown/dropdown_trigger") %>
42
+ <%= pb_rails("dropdown/dropdown_container") do %>
43
+ <% options.each do |option| %>
44
+ <%= pb_rails("dropdown/dropdown_option", props: { option: option }) do %>
45
+ <%= pb_rails("flex", props: { align: "center", justify: "between" }) do %>
46
+ <%= pb_rails("body", props: { color: "default", text: option[:label] }) %>
47
+ <%= pb_rails("icon", props: { icon: "check" }) %>
48
+ <% end %>
49
+ <% end %>
50
+ <% end %>
51
+ <% end %>
52
+ <% end %>
@@ -0,0 +1,99 @@
1
+ import React from 'react'
2
+ import Dropdown from '../_dropdown'
3
+
4
+ import Body from '../../pb_body/_body'
5
+ import Flex from '../../pb_flex/_flex'
6
+ import Icon from '../../pb_icon/_icon'
7
+
8
+ const DropdownCustomIconOptions = (props) => {
9
+
10
+ const options = [
11
+ { label: "Item 1", value: "item-1", id: "1" },
12
+ { label: "Item 2", value: "item-2", id: "2" },
13
+ { label: "Item 3", value: "item-3", id: "3" },
14
+ ]
15
+
16
+
17
+ return (
18
+ <div>
19
+ <Dropdown label="Multiple Icons"
20
+ options={options}
21
+ {...props}
22
+ >
23
+ {options.map((option) => (
24
+ <Dropdown.Option key={option.id}
25
+ option={option}
26
+ >
27
+ <Flex align="center"
28
+ justify="between"
29
+ >
30
+ <Flex align="center">
31
+ <Icon icon="calendar"
32
+ paddingRight="xs"
33
+ {...props}
34
+ />
35
+ <Body color="default"
36
+ text={option.label}
37
+ {...props}
38
+ />
39
+ </Flex>
40
+ <Icon icon="check"
41
+ {...props}
42
+ />
43
+ </Flex>
44
+ </Dropdown.Option>
45
+ ))}
46
+ </Dropdown>
47
+
48
+ <Dropdown label="Icon on Left"
49
+ options={options}
50
+ paddingY="md"
51
+ {...props}
52
+ >
53
+ {options.map((option) => (
54
+ <Dropdown.Option key={option.id}
55
+ option={option}
56
+ >
57
+ <Flex align="center">
58
+ <Icon icon="calendar"
59
+ paddingRight="xs"
60
+ {...props}
61
+ />
62
+ <Body color="default"
63
+ text={option.label}
64
+ {...props}
65
+ />
66
+ </Flex>
67
+ </Dropdown.Option>
68
+ ))}
69
+ </Dropdown>
70
+
71
+ <Dropdown label="Icon on Right"
72
+ options={options}
73
+ {...props}
74
+ >
75
+ {options.map((option) => (
76
+ <Dropdown.Option key={option.id}
77
+ option={option}
78
+ >
79
+ <Flex align="center"
80
+ justify="between"
81
+ >
82
+ <Flex align="center">
83
+ <Body color="default"
84
+ text={option.label}
85
+ {...props}
86
+ />
87
+ </Flex>
88
+ <Icon icon="check"
89
+ {...props}
90
+ />
91
+ </Flex>
92
+ </Dropdown.Option>
93
+ ))}
94
+ </Dropdown>
95
+ </div>
96
+ )
97
+ }
98
+
99
+ export default DropdownCustomIconOptions
@@ -0,0 +1 @@
1
+ Use the `dropdown/dropdown_option` subcomponent structure to include custom layouts inside dropdown menus. Icons can be placed alongside the Body label text.
@@ -0,0 +1 @@
1
+ Use the `Dropdown.Option` subcomponent structure to include custom layouts inside dropdown menus. Icons can be placed alongside the Body label text.
@@ -12,21 +12,21 @@ const DropdownWithCustomOptions = (props) => {
12
12
  const options = [
13
13
  {
14
14
  label: "United States",
15
- value: "United States",
15
+ value: "unitedStates",
16
16
  areaCode: "+1",
17
17
  icon: "πŸ‡ΊπŸ‡Έ",
18
18
  id: "United-states"
19
19
  },
20
20
  {
21
21
  label: "Canada",
22
- value: "Canada",
22
+ value: "canada",
23
23
  areaCode: "+1",
24
24
  icon: "πŸ‡¨πŸ‡¦",
25
25
  id: "canada"
26
26
  },
27
27
  {
28
28
  label: "Pakistan",
29
- value: "Pakistan",
29
+ value: "pakistan",
30
30
  areaCode: "+92",
31
31
  icon: "πŸ‡΅πŸ‡°",
32
32
  id: "pakistan"
@@ -2,21 +2,21 @@
2
2
  options = [
3
3
  {
4
4
  label: "United States",
5
- value: "United States",
5
+ value: "unitedStates",
6
6
  areaCode: "+1",
7
7
  icon: "πŸ‡ΊπŸ‡Έ",
8
8
  id: "us"
9
9
  },
10
10
  {
11
11
  label: "Canada",
12
- value: "Canada",
12
+ value: "canada",
13
13
  areaCode: "+1",
14
14
  icon: "πŸ‡¨πŸ‡¦",
15
15
  id: "ca"
16
16
  },
17
17
  {
18
18
  label: "Pakistan",
19
- value: "Pakistan",
19
+ value: "pakistan",
20
20
  areaCode: "+92",
21
21
  icon: "πŸ‡΅πŸ‡°",
22
22
  id: "pk"
@@ -1,8 +1,8 @@
1
1
  <%
2
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' },
3
+ { label: 'United States', value: 'unitedStates', id: 'us' },
4
+ { label: 'Canada', value: 'canada', id: 'ca' },
5
+ { label: 'Pakistan', value: 'pakistan', id: 'pk' },
6
6
  ]
7
7
 
8
8
  %>
@@ -6,21 +6,21 @@ const DropdownWithCustomPadding = (props) => {
6
6
  const options = [
7
7
  {
8
8
  label: "United States",
9
- value: "United States",
9
+ value: "unitedStates",
10
10
  areaCode: "+1",
11
11
  icon: "πŸ‡ΊπŸ‡Έ",
12
12
  id: "United-states"
13
13
  },
14
14
  {
15
15
  label: "Canada",
16
- value: "Canada",
16
+ value: "canada",
17
17
  areaCode: "+1",
18
18
  icon: "πŸ‡¨πŸ‡¦",
19
19
  id: "canada"
20
20
  },
21
21
  {
22
22
  label: "Pakistan",
23
- value: "Pakistan",
23
+ value: "pakistan",
24
24
  areaCode: "+92",
25
25
  icon: "πŸ‡΅πŸ‡°",
26
26
  id: "pakistan"