playbook_ui_docs 15.3.0.pre.alpha.play249512047 → 15.3.0.pre.alpha.play262912095
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_advanced_table/docs/_advanced_table_background_control_rails.html.erb +4 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.jsx +3 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling.md +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_column_headers.jsx +1 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.html.erb +1 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_column_styling_rails.md +2 -0
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.jsx +9 -1
- data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_padding_control.md +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.html.erb +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.jsx +1 -1
- data/app/pb_kits/playbook/pb_currency/docs/_currency_variants.md +1 -0
- data/dist/playbook-doc.js +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f9432bc7cbca6ae741e44ba62f4f1c6c1c1277a151d40711f07b42b4a71f7b3f
|
|
4
|
+
data.tar.gz: fad525a8051c31f18dd889cb6dd0cb3bceda341e7750683acd3b890ed4dc7459
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8bcc80c952cff3f29fd267375cf9a975248077f82f12c716c1f6f641bdb9435a0011845642eac3087c950e1d9cd5bd1bd41102c17f36572211352b24f5162d46
|
|
7
|
+
data.tar.gz: e7d7354a645bba244122fad1c690a0e1a568ae247e39c6d59ac2da195942bd8cfb9fd9cd83c64c59d98933499638e9ca9c397eacc6ac9a1e443514fe4ee5e00e
|
data/app/pb_kits/playbook/pb_advanced_table/docs/_advanced_table_background_control_rails.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
`column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here.
|
|
1
|
+
`column_styling` can also be used to control the background color on all cells in a given column via the use of the `cell_background_color` key/value pair. Use `cell_background_color` to achieve custom background colors for individual cells as seen here. Use `font_color` to achieve better contrast between cell content and background for darker backgrounds.
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react"
|
|
2
|
-
import AdvancedTable from
|
|
2
|
+
import { AdvancedTable, colors } from "playbook-ui"
|
|
3
3
|
import MOCK_DATA from "./advanced_table_mock_data.json"
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
const AdvancedTableColumnStyling = (props) => {
|
|
6
7
|
const columnDefinitions = [
|
|
7
8
|
{
|
|
@@ -34,6 +35,7 @@ const AdvancedTableColumnStyling = (props) => {
|
|
|
34
35
|
{
|
|
35
36
|
accessor: "graduatedStudents",
|
|
36
37
|
label: "Graduated Students",
|
|
38
|
+
columnStyling:{fontColor: colors.data_8},
|
|
37
39
|
},
|
|
38
40
|
]
|
|
39
41
|
|
|
@@ -4,4 +4,6 @@ The `columnStyling` prop is an optional item that can be used within `columnDefi
|
|
|
4
4
|
|
|
5
5
|
2) `cellAlignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
6
6
|
|
|
7
|
+
3) `fontColor`: This will allow you to control the font color for a given column.
|
|
8
|
+
|
|
7
9
|
`columnStyling` can be used within the columnDefinition of all the columns or some of them, as shown. Each column has its own individual control in this way.
|
|
@@ -4,4 +4,6 @@ The `column_styling` prop is an optional item that can be used within `column_de
|
|
|
4
4
|
|
|
5
5
|
2) `cell_alignment`: This will allow you to control alignment of content within all cells in the given column. This is set to right aligned by default. you can set this to `left`, `right` or `center`.
|
|
6
6
|
|
|
7
|
+
3) `font_color`: This will allow you to control the font color for a given column.
|
|
8
|
+
|
|
7
9
|
`column_styling` can be used within the column_definition of all the columns or some of them, as shown. Each column has its own individual control in this way.
|
|
@@ -22,7 +22,6 @@ const AdvancedTablePaddingControl = (props) => {
|
|
|
22
22
|
{value}
|
|
23
23
|
</Background>
|
|
24
24
|
),
|
|
25
|
-
|
|
26
25
|
},
|
|
27
26
|
{
|
|
28
27
|
accessor: "scheduledMeetings",
|
|
@@ -39,6 +38,15 @@ const AdvancedTablePaddingControl = (props) => {
|
|
|
39
38
|
{
|
|
40
39
|
accessor: "classCompletionRate",
|
|
41
40
|
label: "Class Completion Rate",
|
|
41
|
+
columnStyling:{cellPadding: "none", fontColor: "white"},
|
|
42
|
+
customRenderer: (row, value) => (
|
|
43
|
+
<Background
|
|
44
|
+
backgroundColor={"category_1"}
|
|
45
|
+
padding="xs"
|
|
46
|
+
>
|
|
47
|
+
{value}
|
|
48
|
+
</Background>
|
|
49
|
+
),
|
|
42
50
|
},
|
|
43
51
|
{
|
|
44
52
|
accessor: "graduatedStudents",
|
|
@@ -1,3 +1,3 @@
|
|
|
1
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
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.
|
|
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. Use `fontColor` to achieve better contrast between cell content and background for darker backgrounds.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
**NOTE:** The value passed into the `amount` prop can be either a string or numeric value.
|