playbook_ui_docs 14.24.0.pre.alpha.PLAY2360circleiconbuttonvariantdatabug9404 → 14.24.0.pre.alpha.PLAY23139411

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 849594f566f20e8e6c42f1b31d12c24e650aa872e1d9cb34ac3ee7f2e5650dad
4
- data.tar.gz: 3852cade550c4888e99e49d8ededd7d737bf31e460b00368fc7abe4865d77b5c
3
+ metadata.gz: 0de875159380600189994ed20174c469e68169fa7596c395afeda3ee9f4ace98
4
+ data.tar.gz: 96e03349d30ba93c884dbe83db41cf4898367375bcd934b4d6d8e26fd345f20c
5
5
  SHA512:
6
- metadata.gz: 8dc49b5d7ab27a319f21ff2cabcdd3bb89673c60583b4e74d7903bab73abc7a7ae6429bd71c3a461f7e73ab6f110b7ee0b351bcb15c1935690f99acb29a810cd
7
- data.tar.gz: 9329b21f7cecfa342fce7fbef7ed225365c1f3fe79dead6b668036b265b6363cb4aa3cdb373e1a6cb88a582a228edff1e08631d58d9fc1ad918256ab3a570fd4
6
+ metadata.gz: 92219fef1f922c6f0038be01e1011cf609b95bfe84a50c90776ec00cae95f82a5392dbf1c7044ed23f9f70f11bef02943f705241dd78512bca3bb159fad1701a
7
+ data.tar.gz: a108383d3960c900d7786e5596dafb2a79cf08d484599d458236e1136bbeec7a186ed25c13f1611e62136af1cf04e2578eb416e28121a9f48f23cdcb32efd34b
@@ -0,0 +1,60 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../_advanced_table'
3
+ import Background from '../../pb_background/_background'
4
+ import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
5
+
6
+ const AdvancedTablePaddingControl = (props) => {
7
+ const columnDefinitions = [
8
+ {
9
+ accessor: "year",
10
+ label: "Year",
11
+ cellAccessors: ["quarter", "month", "day"],
12
+ },
13
+ {
14
+ accessor: "newEnrollments",
15
+ label: "New Enrollments",
16
+ columnStyling:{cellPadding: "none"},
17
+ customRenderer: (row, value) => (
18
+ <Background
19
+ backgroundColor={row.original.newEnrollments > 20 ? "success_secondary" : "warning_secondary"}
20
+ padding="xs"
21
+ >
22
+ {value}
23
+ </Background>
24
+ ),
25
+
26
+ },
27
+ {
28
+ accessor: "scheduledMeetings",
29
+ label: "Scheduled Meetings",
30
+ },
31
+ {
32
+ accessor: "attendanceRate",
33
+ label: "Attendance Rate",
34
+ },
35
+ {
36
+ accessor: "completedClasses",
37
+ label: "Completed Classes",
38
+ },
39
+ {
40
+ accessor: "classCompletionRate",
41
+ label: "Class Completion Rate",
42
+ },
43
+ {
44
+ accessor: "graduatedStudents",
45
+ label: "Graduated Students",
46
+ },
47
+ ]
48
+
49
+ return (
50
+ <div>
51
+ <AdvancedTable
52
+ columnDefinitions={columnDefinitions}
53
+ tableData={MOCK_DATA}
54
+ {...props}
55
+ />
56
+ </div>
57
+ )
58
+ }
59
+
60
+ export default AdvancedTablePaddingControl
@@ -0,0 +1,3 @@
1
+ `columnStyling` can also be used to control padding on all cells in a given column via the use of the `cellPadding` key/value pair. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
2
+
3
+ This control can be used in conjunction with the `customRenderer` item within each columnDefinition to achieve custom background colors for individual cells as seen here.
@@ -0,0 +1,57 @@
1
+ import React from "react"
2
+ import AdvancedTable from '../_advanced_table'
3
+ import MOCK_DATA from "./advanced_table_mock_data_with_id.json"
4
+
5
+ const AdvancedTablePaddingControlPerRow = (props) => {
6
+ const columnDefinitions = [
7
+ {
8
+ accessor: "year",
9
+ label: "Year",
10
+ cellAccessors: ["quarter", "month", "day"],
11
+ },
12
+ {
13
+ accessor: "newEnrollments",
14
+ label: "New Enrollments",
15
+ },
16
+ {
17
+ accessor: "scheduledMeetings",
18
+ label: "Scheduled Meetings",
19
+ },
20
+ {
21
+ accessor: "attendanceRate",
22
+ label: "Attendance Rate",
23
+ },
24
+ {
25
+ accessor: "completedClasses",
26
+ label: "Completed Classes",
27
+ },
28
+ {
29
+ accessor: "classCompletionRate",
30
+ label: "Class Completion Rate",
31
+ },
32
+ {
33
+ accessor: "graduatedStudents",
34
+ label: "Graduated Students",
35
+ },
36
+ ]
37
+
38
+ const rowStyling = [
39
+ {
40
+ rowId: "1",
41
+ cellPadding:"md"
42
+ },
43
+ ];
44
+
45
+ return (
46
+ <div>
47
+ <AdvancedTable
48
+ columnDefinitions={columnDefinitions}
49
+ rowStyling={rowStyling}
50
+ tableData={MOCK_DATA}
51
+ {...props}
52
+ />
53
+ </div>
54
+ )
55
+ }
56
+
57
+ export default AdvancedTablePaddingControlPerRow
@@ -0,0 +1 @@
1
+ `rowStyling` can also be used to control padding on all cells in a given row via the use of the `cellPadding` key/value pair as shown here. `cellPadding` lets you use 'xxs', 'xs', 'sm', 'md', 'lg', 'xl' and 'none'.
@@ -66,8 +66,10 @@ examples:
66
66
  - advanced_table_column_visibility_multi: Column Visibility Control with Multi-Header Columns
67
67
  - advanced_table_scrollbar_none: Advanced Table Scrollbar None
68
68
  - advanced_table_row_styling: Row Styling
69
+ - advanced_table_padding_control_per_row: Padding Control using Row Styling
69
70
  - advanced_table_column_styling: Column Styling
70
71
  - advanced_table_column_styling_column_headers: Column Styling with Multiple Headers
72
+ - advanced_table_padding_control: Padding Control using Column Styling
71
73
  - advanced_table_column_border_color: Column Group Border Color
72
74
  - advanced_table_fullscreen: Fullscreen
73
75
  - advanced_table_infinite_scroll: Infinite Scroll
@@ -42,4 +42,6 @@ export {default as AdvancedTableWithCustomHeader} from './_advanced_table_with_c
42
42
  export { default as AdvancedTableCustomSort } from './_advanced_table_custom_sort.jsx'
43
43
  export { default as AdvancedTableWithCustomHeaderMultiHeader } from './_advanced_table_with_custom_header_multi_header.jsx'
44
44
  export { default as AdvancedTableSortPerColumn } from './_advanced_table_sort_per_column.jsx'
45
- export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
45
+ export { default as AdvancedTableSortPerColumnForMultiColumn } from './_advanced_table_sort_per_column_for_multi_column.jsx'
46
+ export { default as AdvancedTablePaddingControl } from './_advanced_table_padding_control.jsx'
47
+ export { default as AdvancedTablePaddingControlPerRow } from './_advanced_table_padding_control_per_row.jsx'