playbook_ui_docs 13.28.0.pre.alpha.play829selectablecardalignment2978 → 13.29.0.pre.alpha.PBNTR329draggablev33059

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom.md +2 -1
  3. data/app/pb_kits/playbook/pb_bar_graph/docs/{_bar_graph_custom.html.erb → _bar_graph_custom_rails.html.erb} +3 -3
  4. data/app/pb_kits/playbook/pb_bar_graph/docs/_bar_graph_custom_rails.md +2 -0
  5. data/app/pb_kits/playbook/pb_bar_graph/docs/example.yml +1 -1
  6. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.jsx +53 -0
  7. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_default.md +4 -0
  8. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_multiple_containers.jsx +158 -0
  9. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_cards.jsx +101 -0
  10. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.jsx +50 -0
  11. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_list.md +1 -0
  12. data/app/pb_kits/playbook/pb_draggable/docs/_draggable_with_selectable_list.jsx +51 -0
  13. data/app/pb_kits/playbook/pb_draggable/docs/example.yml +11 -0
  14. data/app/pb_kits/playbook/pb_draggable/docs/index.js +5 -0
  15. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.jsx +33 -32
  16. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column.md +1 -1
  17. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_column_rails.md +2 -0
  18. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.jsx +33 -33
  19. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row.md +1 -1
  20. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.html.erb +34 -0
  21. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_row_rails.md +2 -0
  22. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.jsx +51 -50
  23. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.md +1 -1
  24. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.html.erb +54 -0
  25. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data_rails.md +2 -0
  26. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.jsx +37 -38
  27. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.md +1 -0
  28. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.html.erb +53 -0
  29. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row_rails.md +1 -0
  30. data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_row.html.erb → _table_outer_padding.html.erb} +7 -7
  31. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.jsx +76 -0
  32. data/app/pb_kits/playbook/pb_table/docs/_table_outer_padding.md +1 -0
  33. data/app/pb_kits/playbook/pb_table/docs/example.yml +9 -9
  34. data/app/pb_kits/playbook/pb_table/docs/index.js +1 -0
  35. data/dist/menu.yml +5 -2
  36. data/dist/playbook-doc.js +10 -10
  37. metadata +25 -7
  38. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_data.html.erb +0 -63
  39. data/app/pb_kits/playbook/pb_table/docs/_table_alignment_shift_row.html.erb +0 -52
  40. /data/app/pb_kits/playbook/pb_table/docs/{_table_alignment_column.html.erb → _table_alignment_column_rails.html.erb} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f58670d450fdd2397e459f39e55cbe6e4022e97416c9adee7c469e4d02474f99
4
- data.tar.gz: c7f35ac44f741a7f1b6e7d91527b45e8132c08106384f5bdc802327deff63e13
3
+ metadata.gz: 10c14d9c29cafc933037cf345a94d8c793de8a2c806240a9ac1fcb52c65ed3ff
4
+ data.tar.gz: ce6c43f50cd194c89827aab59a44a1214f8b1821f9a2bc8e0efe7e826897a336
5
5
  SHA512:
6
- metadata.gz: 12237f5e82cb5f5ed686a1bb48d7ce512ea5b9d32869cfa76a6c692e475b4774b5fb6b4b51a87779a96682cf2268be46d329d5c1c0ca1d7054d7c7dd977fbf77
7
- data.tar.gz: 8f49c3c1c13c6714bb6dadfee21a4264b6547de8ee9adf8991bde83abbf1317483fa34409b26a3c2718817a7b3621b70f1d03a4a68711c7755141ab8e99f805a
6
+ metadata.gz: 217751cb8fbd57472ce3c0f765e4f81c171084cbe4804cfdea13978918a60a6f90c1d42d0f45693e2499ab0c8316f296963028afbb881c6dce7629808acdc8bd
7
+ data.tar.gz: 072247251edc16e23358ddcf8cdf63cd0883c583b03d68aa311a08bbf6b1ee151cb40c79742295ce5a33a2908fd9979944ffd091ad4bc27e99019a9811d67314
@@ -1 +1,2 @@
1
- See https://api.highcharts.com/highcharts/ for a comprehensive list of available options.
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.
@@ -15,7 +15,7 @@
15
15
  data: [1111,677,3245,500,200]
16
16
  }] %>
17
17
 
18
- <% custom_options = {
18
+ <% bar_graph_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: custom_options
49
- }) %>
48
+ custom_options: bar_graph_options
49
+ }) %>
@@ -0,0 +1,2 @@
1
+ The `custom_options` 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.
@@ -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: Custom Overrides
11
+ - bar_graph_custom_rails: 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
@@ -0,0 +1,53 @@
1
+ import React, { useState } from "react";
2
+ import { SelectableList, Draggable, DraggableProvider } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "1",
8
+ text: "Task 1",
9
+ },
10
+ {
11
+ id: "2",
12
+ text: "Task 2",
13
+ },
14
+ {
15
+ id: "3",
16
+ text: "Task 3",
17
+ },
18
+ {
19
+ id: "4",
20
+ text: "Task 4",
21
+ },
22
+ ];
23
+
24
+ const DraggableDefault = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+ return (
28
+ <>
29
+ <DraggableProvider initialItems={data}
30
+ onReorder={(items) => setInitialState(items)}
31
+ >
32
+ <Draggable.Container {...props}>
33
+ <SelectableList variant="checkbox">
34
+ {initialState.map(({ id, text }) => (
35
+ <Draggable.Item id={id}
36
+ key={id}
37
+ >
38
+ <SelectableList.Item
39
+ label={text}
40
+ name={id}
41
+ value={id}
42
+ />
43
+ </Draggable.Item>
44
+ ))}
45
+ </SelectableList>
46
+ </Draggable.Container>
47
+ </DraggableProvider>
48
+ </>
49
+
50
+ );
51
+ };
52
+
53
+ export default DraggableDefault;
@@ -0,0 +1,4 @@
1
+ To use the Draggable kit, you must use the DraggableProvider and pass in `initialItems`. The `onReorder` is a function that returns the data as it changes as items are reordered. Use this to manage state as shown.
2
+
3
+ The `Draggable.Container` specifies the container within which items can be dropped.
4
+ The `Draggable.Item` specifies the items that can be dragged and dropped. `Draggable.Item` requires `id` to be passed in as shown.
@@ -0,0 +1,158 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Caption,
5
+ Card,
6
+ FlexItem,
7
+ Badge,
8
+ Avatar,
9
+ Title,
10
+ Body,
11
+ Draggable,
12
+ DraggableProvider,
13
+ } from "../../";
14
+
15
+ // Initial groups to drag between
16
+ const containers = ["To Do", "In Progress", "Done"];
17
+
18
+ // Initial items to be dragged
19
+ const data = [
20
+ {
21
+ id: "11",
22
+ container: "To Do",
23
+ title: "Task 1",
24
+ description: "Bug fixes",
25
+ assignee_name: "Terry Miles",
26
+ assignee_img: "https://randomuser.me/api/portraits/men/44.jpg",
27
+ },
28
+ {
29
+ id: "12",
30
+ container: "To Do",
31
+ title: "Task 2",
32
+ description: "Documentation",
33
+ assignee_name: "Sophia Miles",
34
+ assignee_img: "https://randomuser.me/api/portraits/women/8.jpg",
35
+ },
36
+ {
37
+ id: "13",
38
+ container: "In Progress",
39
+ title: "Task 3",
40
+ description: "Add a variant",
41
+ assignee_name: "Alice Jones",
42
+ assignee_img: "https://randomuser.me/api/portraits/women/10.jpg",
43
+ },
44
+ {
45
+ id: "14",
46
+ container: "To Do",
47
+ title: "Task 4",
48
+ description: "Add jest tests",
49
+ assignee_name: "Mike James",
50
+ assignee_img: "https://randomuser.me/api/portraits/men/8.jpg",
51
+ },
52
+ {
53
+ id: "15",
54
+ container: "Done",
55
+ title: "Task 5",
56
+ description: "Alpha testing",
57
+ assignee_name: "James Guy",
58
+ assignee_img: "https://randomuser.me/api/portraits/men/18.jpg",
59
+ },
60
+ {
61
+ id: "16",
62
+ container: "In Progress",
63
+ title: "Task 6",
64
+ description: "Release",
65
+ assignee_name: "Sally Jones",
66
+ assignee_img: "https://randomuser.me/api/portraits/women/28.jpg",
67
+ },
68
+ ];
69
+
70
+ const DraggableMultipleContainer = (props) => {
71
+ const [initialState, setInitialState] = useState(data);
72
+
73
+ const badgeProperties = (container) => {
74
+ switch (container) {
75
+ case "To Do":
76
+ return { text: "queue", color: "warning" };
77
+ case "In Progress":
78
+ return { text: "progress", color: "primary" };
79
+ default:
80
+ return { text: "done", color: "success" };
81
+ }
82
+ };
83
+
84
+ return (
85
+ <DraggableProvider initialItems={data}
86
+ onReorder={(items) => setInitialState(items)}
87
+ >
88
+ <Flex
89
+ justifyContent="center"
90
+ {...props}
91
+ >
92
+ {containers?.map((container) => (
93
+ <Draggable.Container
94
+ container={container}
95
+ key={container}
96
+ padding="sm"
97
+ >
98
+ <Caption textAlign="center">{container}</Caption>
99
+ <Flex
100
+ alignItems="stretch"
101
+ orientation="column"
102
+ >
103
+ {initialState
104
+ .filter((item) => item.container === container)
105
+ .map(
106
+ ({
107
+ assignee_img,
108
+ assignee_name,
109
+ description,
110
+ id,
111
+ title,
112
+ }) => (
113
+ <Draggable.Item
114
+ container={container}
115
+ id={id}
116
+ key={id}
117
+ >
118
+ <Card
119
+ marginBottom="sm"
120
+ padding="sm"
121
+ >
122
+ <Flex justify="between">
123
+ <FlexItem>
124
+ <Flex>
125
+ <Avatar
126
+ imageUrl={assignee_img}
127
+ name={assignee_name}
128
+ size="xxs"
129
+ />
130
+ <Title paddingLeft="xs"
131
+ size={4}
132
+ text={title}
133
+ />
134
+ </Flex>
135
+ </FlexItem>
136
+ <Badge
137
+ marginLeft="sm"
138
+ rounded
139
+ text={badgeProperties(container).text}
140
+ variant={badgeProperties(container).color}
141
+ />
142
+ </Flex>
143
+ <Body paddingTop="xs"
144
+ text={description}
145
+ />
146
+ </Card>
147
+ </Draggable.Item>
148
+ )
149
+ )}
150
+ </Flex>
151
+ </Draggable.Container>
152
+ ))}
153
+ </Flex>
154
+ </DraggableProvider>
155
+ );
156
+ };
157
+
158
+ export default DraggableMultipleContainer;
@@ -0,0 +1,101 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Flex,
4
+ Badge,
5
+ Title,
6
+ Icon,
7
+ Draggable,
8
+ DraggableProvider,
9
+ Card,
10
+ Caption,
11
+ } from "../../";
12
+
13
+ // Initial items to be dragged
14
+ const data = [
15
+ {
16
+ id: "21",
17
+ text: "Joe Black",
18
+ },
19
+ {
20
+ id: "22",
21
+ text: "Nancy White",
22
+ },
23
+ {
24
+ id: "23",
25
+ text: "Bill Green",
26
+ },
27
+ ];
28
+
29
+ const DraggableWithCards = (props) => {
30
+ const [initialState, setInitialState] = useState(data);
31
+
32
+ return (
33
+ <DraggableProvider
34
+ initialItems={data}
35
+ onReorder={(items) => setInitialState(items)}
36
+ >
37
+ <Draggable.Container {...props}>
38
+ {initialState.map(({ id, text }) => (
39
+ <Card
40
+ dragHandle
41
+ draggableItem
42
+ highlight={{ color: "primary", position: "side" }}
43
+ id={id}
44
+ key={id}
45
+ marginBottom="xs"
46
+ padding="xs"
47
+ >
48
+ <Flex alignItems="stretch"
49
+ flexDirection="column"
50
+ >
51
+ <Flex gap="xs">
52
+ <Title size={4}
53
+ text={text}
54
+ />
55
+ <Badge
56
+ text="35-12345"
57
+ variant="primary"
58
+ />
59
+ </Flex>
60
+ <Caption
61
+ size="xs"
62
+ text="8:00A • Township Name • 90210"
63
+ />
64
+ <Flex gap="xxs"
65
+ spacing="between"
66
+ >
67
+ <Flex gap="xxs">
68
+ <Caption color="error"
69
+ size="xs"
70
+ >
71
+ <Icon icon="house-circle-exclamation" />
72
+ </Caption>
73
+ <Caption color="success"
74
+ size="xs">
75
+ <Icon icon="file-circle-check" />
76
+ </Caption>
77
+ </Flex>
78
+ <Flex>
79
+ <Badge rounded
80
+ text="Schedule QA"
81
+ variant="warning"
82
+ />
83
+ <Badge rounded
84
+ text="Flex"
85
+ variant="primary"
86
+ />
87
+ <Badge rounded
88
+ text="R99"
89
+ variant="primary"
90
+ />
91
+ </Flex>
92
+ </Flex>
93
+ </Flex>
94
+ </Card>
95
+ ))}
96
+ </Draggable.Container>
97
+ </DraggableProvider>
98
+ );
99
+ };
100
+
101
+ export default DraggableWithCards;
@@ -0,0 +1,50 @@
1
+ import React, { useState } from "react";
2
+ import { DraggableProvider, List, ListItem } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "31",
8
+ text: "Philadelphia",
9
+ },
10
+ {
11
+ id: "32",
12
+ text: "New Jersey",
13
+ },
14
+ {
15
+ id: "33",
16
+ text: "Maryland",
17
+ },
18
+ {
19
+ id: "34",
20
+ text: "Connecticut",
21
+ },
22
+ ];
23
+
24
+ const DraggableWithList = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+
28
+ return (
29
+ <>
30
+ <DraggableProvider initialItems={data}
31
+ onReorder={(items) => setInitialState(items)}
32
+ >
33
+ <List draggable
34
+ {...props}
35
+ >
36
+ {initialState.map(({ id, text }) => (
37
+ <ListItem id={id}
38
+ key={id}
39
+ >
40
+ {text}
41
+ </ListItem>
42
+ ))}
43
+ </List>
44
+ </DraggableProvider>
45
+ </>
46
+
47
+ );
48
+ };
49
+
50
+ export default DraggableWithList;
@@ -0,0 +1 @@
1
+ For a simplified version of the Draggable API for the List kit, use the DraggableProvider to wrap the List kit and use the `draggable` prop on List. The dev must manage state as shown and pass in id to the ListItem.
@@ -0,0 +1,51 @@
1
+ import React, { useState } from "react";
2
+ import { SelectableList, DraggableProvider } from "../../";
3
+
4
+ // Initial items to be dragged
5
+ const data = [
6
+ {
7
+ id: "41",
8
+ text: "Task 1",
9
+ },
10
+ {
11
+ id: "42",
12
+ text: "Task 2",
13
+ },
14
+ {
15
+ id: "43",
16
+ text: "Task 3",
17
+ },
18
+ {
19
+ id: "44",
20
+ text: "Task 4",
21
+ },
22
+ ];
23
+
24
+ const DraggableWithSelectableList = (props) => {
25
+ const [initialState, setInitialState] = useState(data);
26
+
27
+ return (
28
+ <>
29
+ <DraggableProvider initialItems={data}
30
+ onReorder={(items) => setInitialState(items)}
31
+ >
32
+ <SelectableList draggable
33
+ variant="checkbox"
34
+ {...props}
35
+ >
36
+ {initialState.map(({ id, text }) => (
37
+ <SelectableList.Item id={id}
38
+ key={id}
39
+ label={text}
40
+ name={id}
41
+ value={id}
42
+ />
43
+ ))}
44
+ </SelectableList>
45
+ </DraggableProvider>
46
+ </>
47
+
48
+ );
49
+ };
50
+
51
+ export default DraggableWithSelectableList
@@ -0,0 +1,11 @@
1
+ examples:
2
+
3
+
4
+ react:
5
+ - draggable_default: Default
6
+ - draggable_with_list: Draggable with List Kit
7
+ - draggable_with_selectable_list: Draggable with SelectableList Kit
8
+ - draggable_with_cards: Draggable with Cards
9
+ - draggable_multiple_containers: Dragging Across Multiple Containers
10
+
11
+
@@ -0,0 +1,5 @@
1
+ export { default as DraggableDefault } from './_draggable_default.jsx'
2
+ export { default as DraggableWithCards } from './_draggable_with_cards.jsx'
3
+ export { default as DraggableWithList } from './_draggable_with_list.jsx'
4
+ export { default as DraggableWithSelectableList } from './_draggable_with_selectable_list.jsx'
5
+ export { default as DraggableMultipleContainers } from './_draggable_multiple_containers.jsx'
@@ -7,39 +7,40 @@ const TableAlignmentColumn = (props) => {
7
7
  <Table
8
8
  {...props}
9
9
  >
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>
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>
42
42
  </Table>
43
+
43
44
  )
44
45
  }
45
46
 
@@ -1,2 +1,2 @@
1
- You can individually align a piece of table data, but a more practical use would be applied to align a column.
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.
2
2
  In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
@@ -0,0 +1,2 @@
1
+ Pass our `text_align` global prop to any `table/table_cell` subcomponent to change the text alignment of individual cells, or apply this prop persistently to align entire columns.
2
+ In the table above the "Rating" column contents is centered and the "Money" column contents is right aligned.
@@ -7,39 +7,39 @@ const TableAlignmentRow = (props) => {
7
7
  <Table
8
8
  {...props}
9
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>{'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>
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>
43
43
  )
44
44
  }
45
45
 
@@ -1,2 +1,2 @@
1
- This is to be used to shift the whole row.
1
+ Pass our `textAlign` global prop to any `table.row` subcomponent to change the text alignment of all cells within that 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.