playbook_ui_docs 13.28.0.pre.alpha.PBNTR297gradientoverlay3029 → 13.28.0.pre.alpha.PLAY888Cardkithighlightoverflowtooltiperror2937

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_subrow_headers.md +1 -1
  3. data/app/pb_kits/playbook/pb_advanced_table/docs/example.yml +1 -1
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom_rails.html.erb → _bar_graph_custom.html.erb} +3 -3
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +1 -2
  6. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
  7. data/app/pb_kits/playbook/pb_form/docs/_form_form_with.html.erb +0 -10
  8. data/app/pb_kits/playbook/pb_pill/docs/_description.md +1 -1
  9. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +32 -33
  10. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
  11. data/app/pb_kits/playbook/pb_table/docs/{_table_outer_padding.html.erb → _table_alignment_row.html.erb} +7 -7
  12. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
  13. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
  14. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +63 -0
  15. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +50 -51
  16. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
  17. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +52 -0
  18. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +38 -37
  19. data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
  20. data/app/pb_kits/playbook/pb_table/docs/index.js +0 -1
  21. data/dist/menu.yml +2 -7
  22. data/dist/playbook-doc.js +10 -10
  23. metadata +7 -29
  24. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.html.erb +0 -40
  25. data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_beta_subrow_headers.md +0 -3
  26. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +0 -2
  27. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +0 -53
  28. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +0 -159
  29. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +0 -121
  30. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +0 -9
  31. data/app/pb_kits/playbook/pb_draggable/docs/index.js +0 -3
  32. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.jsx +0 -40
  33. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_default.md +0 -7
  34. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.jsx +0 -36
  35. data/app/pb_kits/playbook/pb_overlay/docs/_overlay_multi_directional.md +0 -5
  36. data/app/pb_kits/playbook/pb_overlay/docs/example.yml +0 -4
  37. data/app/pb_kits/playbook/pb_overlay/docs/index.js +0 -2
  38. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +0 -2
  39. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +0 -34
  40. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +0 -2
  41. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +0 -54
  42. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +0 -2
  43. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +0 -1
  44. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +0 -53
  45. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +0 -1
  46. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +0 -76
  47. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +0 -1
  48. /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column_rails.html.erb → _table_alignment_column.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68319a6bec5bf342bcc43c82ea9f60eea9b3998bbc731ec509cc9045935afde3
4
- data.tar.gz: 587805464e81282168cf9035f2100486356f4ceca8495879fcd10f0360d3df7e
3
+ metadata.gz: 3fdca61b26fda48aa6b5331f6a7de27efecd3e1618fe07ef010a17390ee1b328
4
+ data.tar.gz: 42f46eb60a91d7b41365436b6e40d636159fc5695c61b4eb849074566388a3da
5
5
  SHA512:
6
- metadata.gz: 76cedfd8ebd4cfb5cf29a38f03e646d52044cb058c486e26c82a0f8e84b30e051b5320591c86d605c14988719392e799cbff4c200580e8a063b85b074c12aaa4
7
- data.tar.gz: dc466cd04903c60c0173f5e62ade2a93c92da6760c3f74da08d42adfcb07d677befe201b04435750b61688f6e82d80c57574c67e85d63d483417c46fdfc8cc51
6
+ metadata.gz: 69eb11de117b6fda6fd8b6e98eb0710339df7fff41e5aef6c8732d17308a7ec315e80b5ec080828be5ade18f43b7f3dc3636c9831fdbb203aa610ed88f7bba80
7
+ data.tar.gz: 4cdf8fd4c336906ec936c4c7d22cf5247a0ce36afa1ea17ae51e99cb2e9e507f154ae108477038350b3f7643e8f4dd838711e5a974a95312cb4977bd4509d230
@@ -1,3 +1,3 @@
1
1
  `subRowHeaders` is an optional prop that if present will add header rows at each level of the nested data. The prop takes an array of strings, each string being the text for each header row. The array of strings must be in the order in which they need to be rendered in the UI according to depth.
2
2
 
3
- `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be "all", "header" or "none". If set to "all", the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to "header" button will only appear in header and NOT in subRow headers. This is set to "header" by default.
3
+ `enableToggleExpansion` is an additional optional prop that can be used in conjunction with the subRowHeaders prop. `enableToggleExpansion` is a string that can be 'all', 'header" or "none". If set to 'all', the toggle exapansion button will appear in the table header as well as in the subRow headers. If set to 'header' button will only appear in header and NOT in subRow headers. This is set to 'header' by default.
@@ -1,7 +1,6 @@
1
1
  examples:
2
2
  rails:
3
3
  - advanced_table_beta: Default (Required Props)
4
- - advanced_table_beta_subrow_headers: SubRow Headers
5
4
  react:
6
5
  - advanced_table_default: Default (Required Props)
7
6
  - advanced_table_loading: Loading State
@@ -13,3 +12,4 @@ examples:
13
12
  - advanced_table_table_options: Table Options
14
13
  - advanced_table_table_props: Table Props
15
14
  - advanced_table_inline_row_loading: inline Row Loading
15
+
@@ -15,7 +15,7 @@
15
15
  data: [1111,677,3245,500,200]
16
16
  }] %>
17
17
 
18
- <% bar_graph_options = {
18
+ <% custom_options = {
19
19
  customOptions: {
20
20
  subtitle: {
21
21
  text: "Overwritten subtitle",
@@ -45,5 +45,5 @@
45
45
  y_axis_min: 0,
46
46
  subtitle: 'Subtitle to replace',
47
47
  title: 'Bar Graph with Custom Overrides',
48
- custom_options: bar_graph_options
49
- }) %>
48
+ custom_options: custom_options
49
+ }) %>
@@ -1,2 +1 @@
1
- The `customOptions` prop provides comprehensive access to additional [Highcharts options](https://api.highcharts.com/highcharts/) that are not explicitly defined as props.
2
- It's important to note that certain options may require specific script imports to function properly.
1
+ See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
@@ -8,7 +8,7 @@ examples:
8
8
  - bar_graph_height: Height
9
9
  - bar_graph_spline: Spline
10
10
  - bar_graph_colors: Color Overrides
11
- - bar_graph_custom_rails: Custom Overrides
11
+ - bar_graph_custom: Custom Overrides
12
12
  - bar_graph_stacked: Stacked
13
13
  - bar_graph_negative_numbers: Negative Numbers
14
14
  - bar_graph_secondary_y_axis: Secondary Y-Axis
@@ -13,15 +13,6 @@
13
13
  ]
14
14
  %>
15
15
 
16
- <%
17
- example_dropdown_options = [
18
- { label: 'United States', value: 'United States', id: 'us' },
19
- { label: 'Canada', value: 'Canada', id: 'ca' },
20
- { label: 'Pakistan', value: 'Pakistan', id: 'pk' },
21
- ]
22
-
23
- %>
24
-
25
16
  <%= pb_form_with(scope: :example, url: "", method: :get) do |form| %>
26
17
  <%= form.typeahead :example_user, props: { data: { typeahead_example1: true, user: {} }, placeholder: "Search for a user" } %>
27
18
  <%= form.text_field :example_text_field, props: { label: true } %>
@@ -32,7 +23,6 @@
32
23
  <%= form.password_field :example_password_field, props: { label: true } %>
33
24
  <%= form.url_field :example_url_field, props: { label: true } %>
34
25
  <%= form.text_area :example_text_area, props: { label: true } %>
35
- <%= form.dropdown_field :example_dropdown, props: { label: true, options: example_dropdown_options } %>
36
26
  <%= form.select :example_select, [ ["Yes", 1], ["No", 2] ], props: { label: true } %>
37
27
  <%= form.collection_select :example_collection_select, example_collection, :value, :name, props: { label: true } %>
38
28
  <%= form.check_box :example_checkbox,
@@ -1 +1 @@
1
- A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color <a href="https://playbook.powerapp.cloud/visual_guidelines/colors" target="_blank">here</a>.
1
+ A pill uses both a keyword and a specific color to categorize an item. Each pill directly corresponds to a data color here: https://playbook.powerapp.cloud/utilities
@@ -7,40 +7,39 @@ const TableAlignmentColumn = (props) => {
7
7
  <Table
8
8
  {...props}
9
9
  >
10
- <Table.Head>
11
- <Table.Row>
12
- <Table.Header>{'Column 1'}</Table.Header>
13
- <Table.Header>{'Column 2'}</Table.Header>
14
- <Table.Header>{'Column 3'}</Table.Header>
15
- <Table.Header textAlign="center">{'Rating'}</Table.Header>
16
- <Table.Header textAlign="right">{'Money'}</Table.Header>
17
- </Table.Row>
18
- </Table.Head>
19
- <Table.Body>
20
- <Table.Row>
21
- <Table.Cell>{'Value 1'}</Table.Cell>
22
- <Table.Cell>{'Value 2'}</Table.Cell>
23
- <Table.Cell>{'Value 3'}</Table.Cell>
24
- <Table.Cell textAlign="center">{'3'}</Table.Cell>
25
- <Table.Cell textAlign="right">{'$57.32'}</Table.Cell>
26
- </Table.Row>
27
- <Table.Row>
28
- <Table.Cell>{'Value 1'}</Table.Cell>
29
- <Table.Cell>{'Value 2'}</Table.Cell>
30
- <Table.Cell>{'Value 3'}</Table.Cell>
31
- <Table.Cell textAlign="center">{'2'}</Table.Cell>
32
- <Table.Cell textAlign="right">{'$5,657.08'}</Table.Cell>
33
- </Table.Row>
34
- <Table.Row>
35
- <Table.Cell>{'Value 1'}</Table.Cell>
36
- <Table.Cell>{'Value 2'}</Table.Cell>
37
- <Table.Cell>{'Value 3'}</Table.Cell>
38
- <Table.Cell textAlign="center">{'4'}</Table.Cell>
39
- <Table.Cell textAlign="right">{'$358.77'}</Table.Cell>
40
- </Table.Row>
41
- </Table.Body>
10
+ <thead>
11
+ <tr>
12
+ <th>{'Column 1'}</th>
13
+ <th>{'Column 2'}</th>
14
+ <th>{'Column 3'}</th>
15
+ <th align="center">{'Rating'}</th>
16
+ <th align="right">{'Money'}</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td>{'Value 1'}</td>
22
+ <td>{'Value 2'}</td>
23
+ <td>{'Value 3'}</td>
24
+ <td align="center">{'3'}</td>
25
+ <td align="right">{'$57.32'}</td>
26
+ </tr>
27
+ <tr>
28
+ <td>{'Value 1'}</td>
29
+ <td>{'Value 2'}</td>
30
+ <td>{'Value 3'}</td>
31
+ <td align="center">{'2'}</td>
32
+ <td align="right">{'$5,657.08'}</td>
33
+ </tr>
34
+ <tr>
35
+ <td>{'Value 1'}</td>
36
+ <td>{'Value 2'}</td>
37
+ <td>{'Value 3'}</td>
38
+ <td align="center">{'4'}</td>
39
+ <td align="right">{'$358.77'}</td>
40
+ </tr>
41
+ </tbody>
42
42
  </Table>
43
-
44
43
  )
45
44
  }
46
45
 
@@ -1,2 +1,2 @@
1
- Pass our `textAlign` global prop to any `table.cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
1
+ You can individually align a piece of table data, but a more practical use would be applied to align a column.
2
2
  In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
@@ -1,11 +1,11 @@
1
- <%= pb_rails("table", props: { outer_padding: "sm", size: "sm" }) do %>
1
+ <%= pb_rails("table") do %>
2
2
  <thead>
3
3
  <tr>
4
4
  <th>Column 1</th>
5
5
  <th>Column 2</th>
6
6
  <th>Column 3</th>
7
7
  <th>Column 4</th>
8
- <th></th>
8
+ <th>Column 5</th>
9
9
  </tr>
10
10
  </thead>
11
11
  <tbody>
@@ -14,21 +14,21 @@
14
14
  <td>Value 2</td>
15
15
  <td>Value 3</td>
16
16
  <td>Value 4</td>
17
- <td align="right"><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
17
+ <td>Value 5</td>
18
18
  </tr>
19
- <tr>
19
+ <tr align="center">
20
20
  <td>Value 1</td>
21
21
  <td>Value 2</td>
22
22
  <td>Value 3</td>
23
23
  <td>Value 4</td>
24
- <td align="right"><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
24
+ <td>Value 5</td>
25
25
  </tr>
26
- <tr>
26
+ <tr align="right">
27
27
  <td>Value 1</td>
28
28
  <td>Value 2</td>
29
29
  <td>Value 3</td>
30
30
  <td>Value 4</td>
31
- <td align="right"><%= pb_rails("button", props: { text: "Action", variant: "secondary" }) %></td>
31
+ <td>Value 5</td>
32
32
  </tr>
33
33
  </tbody>
34
34
  <% end %>
@@ -7,39 +7,39 @@ const TableAlignmentRow = (props) => {
7
7
  <Table
8
8
  {...props}
9
9
  >
10
- <Table.Head>
11
- <Table.Row>
12
- <Table.Header>{'Column 1'}</Table.Header>
13
- <Table.Header>{'Column 2'}</Table.Header>
14
- <Table.Header>{'Column 3'}</Table.Header>
15
- <Table.Header>{'Column 4'}</Table.Header>
16
- <Table.Header>{'Column 5'}</Table.Header>
17
- </Table.Row>
18
- </Table.Head>
19
- <Table.Body>
20
- <Table.Row>
21
- <Table.Cell>{'Value 1'}</Table.Cell>
22
- <Table.Cell>{'Value 2'}</Table.Cell>
23
- <Table.Cell>{'Value 3'}</Table.Cell>
24
- <Table.Cell>{'Value 4'}</Table.Cell>
25
- <Table.Cell>{'Value 5'}</Table.Cell>
26
- </Table.Row>
27
- <Table.Row textAlign="center">
28
- <Table.Cell>{'Value 1'}</Table.Cell>
29
- <Table.Cell>{'Value 2'}</Table.Cell>
30
- <Table.Cell>{'Value 3'}</Table.Cell>
31
- <Table.Cell>{'Value 4'}</Table.Cell>
32
- <Table.Cell>{'Value 5'}</Table.Cell>
33
- </Table.Row>
34
- <Table.Row textAlign="right">
35
- <Table.Cell>{'Value 1'}</Table.Cell>
36
- <Table.Cell>{'Value 2'}</Table.Cell>
37
- <Table.Cell>{'Value 3'}</Table.Cell>
38
- <Table.Cell>{'Value 4'}</Table.Cell>
39
- <Table.Cell>{'Value 5'}</Table.Cell>
40
- </Table.Row>
41
- </Table.Body>
42
- </Table>
10
+ <thead>
11
+ <tr>
12
+ <th>{'Column 1'}</th>
13
+ <th>{'Column 2'}</th>
14
+ <th>{'Column 3'}</th>
15
+ <th>{'Column 4'}</th>
16
+ <th>{'Column 5'}</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td>{'Value 1'}</td>
22
+ <td>{'Value 2'}</td>
23
+ <td>{'Value 3'}</td>
24
+ <td>{'Value 4'}</td>
25
+ <td>{'Value 5'}</td>
26
+ </tr>
27
+ <tr align="center">
28
+ <td>{'Value 1'}</td>
29
+ <td>{'Value 2'}</td>
30
+ <td>{'Value 3'}</td>
31
+ <td>{'Value 4'}</td>
32
+ <td>{'Value 5'}</td>
33
+ </tr>
34
+ <tr align="right">
35
+ <td>{'Value 1'}</td>
36
+ <td>{'Value 2'}</td>
37
+ <td>{'Value 3'}</td>
38
+ <td>{'Value 4'}</td>
39
+ <td>{'Value 5'}</td>
40
+ </tr>
41
+ </tbody>
42
+ </Table>
43
43
  )
44
44
  }
45
45
 
@@ -1,2 +1,2 @@
1
- Pass our `textAlign` global prop to any `table.row` subcomponent to change the text alignment of all cells within that row.
1
+ This is to be used to shift the whole row.
2
2
  The header/ first row is the default, followed by the second row being centered, and then the last row shifted to the right.
@@ -0,0 +1,63 @@
1
+ <%= pb_rails("table") do %>
2
+ <thead>
3
+ <tr>
4
+ <th>&nbsp;</th>
5
+ <th>Price</th>
6
+ </tr>
7
+ </thead>
8
+ <tbody>
9
+ <tr>
10
+ <td shift="down">Total</td>
11
+ <td>
12
+ $12
13
+ <br/>
14
+ $46
15
+ <br/>
16
+ $25
17
+ <br/>
18
+ -------
19
+ <br/>
20
+ $83
21
+ </td>
22
+ </tr>
23
+ </tbody>
24
+ <% end %>
25
+ <br/>
26
+ <%= pb_rails("table") do %>
27
+ <thead>
28
+ <tr>
29
+ <th>Espresso Drinks</th>
30
+ <th>Ingredients</th>
31
+ </tr>
32
+ </thead>
33
+ <tbody>
34
+ <tr>
35
+ <td shift="up">Cappuccino</td>
36
+ <td>
37
+ Espresso
38
+ <br/>
39
+ Steamed Milk
40
+ <br/>
41
+ Milk Foam
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td shift="up">Macchiato</td>
46
+ <td>
47
+ Espresso
48
+ <br/>
49
+ Steamed Milk
50
+ </td>
51
+ </tr>
52
+ <tr>
53
+ <td shift="up">Mocha</td>
54
+ <td>
55
+ Espresso
56
+ <br/>
57
+ Hot Chocolate
58
+ <br/>
59
+ Steamed Milk
60
+ </td>
61
+ </tr>
62
+ </tbody>
63
+ <% end %>
@@ -9,16 +9,16 @@ const TableAlignmentShiftData = (props) => {
9
9
  marginBottom="md"
10
10
  {...props}
11
11
  >
12
- <Table.Head>
13
- <Table.Row>
14
- <Table.Header>&nbsp;</Table.Header>
15
- <Table.Header>{'Price'}</Table.Header>
16
- </Table.Row>
17
- </Table.Head>
18
- <Table.Body>
19
- <Table.Row>
20
- <Table.Cell verticalAlign="bottom">{'Total'}</Table.Cell>
21
- <Table.Cell>
12
+ <thead>
13
+ <tr>
14
+ <th>&nbsp;</th>
15
+ <th>{'Price'}</th>
16
+ </tr>
17
+ </thead>
18
+ <tbody>
19
+ <tr>
20
+ <td shift="down">{'Total'}</td>
21
+ <td>
22
22
  {'$12'}
23
23
  <br />
24
24
  {'$46'}
@@ -28,51 +28,50 @@ const TableAlignmentShiftData = (props) => {
28
28
  {'-------'}
29
29
  <br />
30
30
  {'$83'}
31
- </Table.Cell>
32
- </Table.Row>
33
- </Table.Body>
31
+ </td>
32
+ </tr>
33
+ </tbody>
34
34
  </Table>
35
-
36
35
  <Table
37
36
  {...props}
38
37
  >
39
- <Table.Head>
40
- <Table.Row>
41
- <Table.Header>{'Espresso Drinks'}</Table.Header>
42
- <Table.Header>{'Ingredients'}</Table.Header>
43
- </Table.Row>
44
- </Table.Head>
45
- <Table.Body>
46
- <Table.Row>
47
- <Table.Cell verticalAlign="top">{'Cappuccino'} </Table.Cell>
48
- <Table.Cell>
49
- {'Steamed Milk'}
50
- <br />
51
- {'Milk Foam'}
52
- </Table.Cell>
53
- </Table.Row>
54
- <Table.Row>
55
- <Table.Cell verticalAlign="top">
56
- {'Macchiato'}
57
- </Table.Cell>
58
- <Table.Cell verticalAlign="top">
59
- {'Espresso'}
60
- <br />
61
- {'Steamed Milk'}
62
- </Table.Cell>
63
- </Table.Row>
64
- <Table.Row>
65
- <Table.Cell>
66
- {'Mocha'}
67
- </Table.Cell>
68
- <Table.Cell>
69
- {'Hot Chocolate'}
70
- <br />
71
- {'Steamed Milk'}
72
- </Table.Cell>
73
- </Table.Row>
74
- </Table.Body>
75
- </Table>
38
+ <thead>
39
+ <tr>
40
+ <th>{'Espresso Drinks'}</th>
41
+ <th>{'Ingredients'}</th>
42
+ </tr>
43
+ </thead>
44
+ <tbody>
45
+ <tr>
46
+ <td shift="up">{'Cappuccino'}</td>
47
+ <td>
48
+ {'Espresso'}
49
+ <br />
50
+ {'Steamed Milk'}
51
+ <br />
52
+ {'Milk Foam'}
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td shift="up">{'Macchiato'}</td>
57
+ <td>
58
+ {'Espresso'}
59
+ <br />
60
+ {'Steamed Milk'}
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td shift="up">{'Mocha'}</td>
65
+ <td>
66
+ {'Espresso'}
67
+ <br />
68
+ {'Hot Chocolate'}
69
+ <br />
70
+ {'Steamed Milk'}
71
+ </td>
72
+ </tr>
73
+ </tbody>
74
+ </Table>
76
75
  </div>
77
76
  )
78
77
  }
@@ -1,2 +1,2 @@
1
- Pass our `verticalAlign` global prop to any `table.cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
1
+ You can individually shift a piece of table data, or shift an entire column.
2
2
  The first table shifts "Total" down, whereas the second table shifts the "Espresso Drinks" column contents up.
@@ -0,0 +1,52 @@
1
+ <%= pb_rails("table") do %>
2
+ <thead>
3
+ <tr>
4
+ <th>Column 1</th>
5
+ <th>Column 2</th>
6
+ <th>Column 3</th>
7
+ <th>Column 4</th>
8
+ <th>Column 5</th>
9
+ </tr>
10
+ </thead>
11
+ <tbody>
12
+ <tr>
13
+ <td>
14
+ Value 1a
15
+ <br/>
16
+ Value 1a
17
+ <br/>
18
+ Value 1a
19
+ </td>
20
+ <td>Value 2a</td>
21
+ <td>Value 3a</td>
22
+ <td>Value 4a</td>
23
+ <td>Value 5a</td>
24
+ </tr>
25
+ <tr shift="middle">
26
+ <td>
27
+ Value 1b
28
+ <br/>
29
+ Value 1b
30
+ <br/>
31
+ Value 1b
32
+ </td>
33
+ <td>Value 2b</td>
34
+ <td>Value 3b</td>
35
+ <td>Value 4b</td>
36
+ <td>Value 5b</td>
37
+ </tr>
38
+ <tr shift="down">
39
+ <td>
40
+ Value 1c
41
+ <br/>
42
+ Value 1c
43
+ <br/>
44
+ Value 1c
45
+ </td>
46
+ <td>Value 2c</td>
47
+ <td>Value 3c</td>
48
+ <td>Value 4c</td>
49
+ <td>Value 5c</td>
50
+ </tr>
51
+ </tbody>
52
+ <% end %>
@@ -4,59 +4,60 @@ import Table from '../_table'
4
4
 
5
5
  const TableAlignmentShiftRow = (props) => {
6
6
  return (
7
- <Table {...props}>
8
- <Table.Head>
9
- <Table.Row>
10
- <Table.Header>{'Column 1'}</Table.Header>
11
- <Table.Header>{'Column 2'}</Table.Header>
12
- <Table.Header>{'Column 3'}</Table.Header>
13
- <Table.Header>{'Column 4'}</Table.Header>
14
- <Table.Header>{'Column 5'}</Table.Header>
15
- </Table.Row>
16
- </Table.Head>
17
- <Table.Body>
18
- <Table.Row>
19
- <Table.Cell>
7
+ <Table
8
+ {...props}
9
+ >
10
+ <thead>
11
+ <tr>
12
+ <th>{'Column 1'}</th>
13
+ <th>{'Column 2'}</th>
14
+ <th>{'Column 3'}</th>
15
+ <th>{'Column 4'}</th>
16
+ <th>{'Column 5'}</th>
17
+ </tr>
18
+ </thead>
19
+ <tbody>
20
+ <tr>
21
+ <td>
20
22
  {'Value 1a'}
21
23
  <br />
22
24
  {'Value 1a'}
23
25
  <br />
24
26
  {'Value 1a'}
25
- </Table.Cell>
26
- <Table.Cell>{'Value 2a'}</Table.Cell>
27
- <Table.Cell>{'Value 3a'}</Table.Cell>
28
- <Table.Cell>{'Value 4a'}</Table.Cell>
29
- <Table.Cell>{'Value 5a'}</Table.Cell>
30
- </Table.Row>
31
- <Table.Row verticalAlign="middle">
32
- <Table.Cell>
27
+ </td>
28
+ <td>{'Value 2a'}</td>
29
+ <td>{'Value 3a'}</td>
30
+ <td>{'Value 4a'}</td>
31
+ <td>{'Value 5a'}</td>
32
+ </tr>
33
+ <tr shift="middle">
34
+ <td>
33
35
  {'Value 1b'}
34
36
  <br />
35
37
  {'Value 1b'}
36
38
  <br />
37
39
  {'Value 1b'}
38
- </Table.Cell>
39
- <Table.Cell>{'Value 2b'}</Table.Cell>
40
- <Table.Cell>{'Value 3b'}</Table.Cell>
41
- <Table.Cell>{'Value 4b'}</Table.Cell>
42
- <Table.Cell>{'Value 5b'}</Table.Cell>
43
- </Table.Row>
44
- <Table.Row verticalAlign="bottom">
45
- <Table.Cell>
40
+ </td>
41
+ <td>{'Value 2b'}</td>
42
+ <td>{'Value 3b'}</td>
43
+ <td>{'Value 4b'}</td>
44
+ <td>{'Value 5b'}</td>
45
+ </tr>
46
+ <tr shift="down">
47
+ <td>
46
48
  {'Value 1c'}
47
49
  <br />
48
50
  {'Value 1c'}
49
51
  <br />
50
52
  {'Value 1c'}
51
- </Table.Cell>
52
- <Table.Cell>{'Value 2c'}</Table.Cell>
53
- <Table.Cell>{'Value 3c'}</Table.Cell>
54
- <Table.Cell>{'Value 4c'}</Table.Cell>
55
- <Table.Cell>{'Value 5c'}</Table.Cell>
56
- </Table.Row>
57
- </Table.Body>
53
+ </td>
54
+ <td>{'Value 2c'}</td>
55
+ <td>{'Value 3c'}</td>
56
+ <td>{'Value 4c'}</td>
57
+ <td>{'Value 5c'}</td>
58
+ </tr>
59
+ </tbody>
58
60
  </Table>
59
-
60
61
  )
61
62
  }
62
63