Add ability to customize row and header style attribute on multi-table widget.

This commit is contained in:
Jim Myers 2019-03-12 11:13:19 -04:00
parent b8abd9203f
commit f4e0da2d8d
2 changed files with 16 additions and 11 deletions

View File

@ -152,12 +152,19 @@
fontFamily: "inherit",
limit: 50,
mode: "light",
headers: {
style: {
fontWeight: "bold",
padding: "10px 0 10px 0"
}
},
rows: {
dividers: true,
dividersColor: "#eaeaea",
alternating: false,
padding: "10px 0 10px 0",
headerBold: true
style: {
padding: "10px 0 10px 0"
}
},
title: {
text: "Top 50 Coins By Market Cap",
@ -185,8 +192,10 @@
rows: {
alternating: true,
alternatingColors: "#eeeeee",
dividers: false,
style: {}
dividers: false
// style: {
// padding: "5px 10px"
// }
},
title: {
text: "Top Coins",

View File

@ -187,8 +187,7 @@ export default class MultiTable extends Component<Props, State> {
alternatingColors: [],
dividers: false,
dividersColor: null,
padding: "5px 10px",
headerBold: false
style: {}
},
trend: {
changeOver: 7
@ -272,10 +271,7 @@ export default class MultiTable extends Component<Props, State> {
<th
class={classes}
onClick={() => this.handleClickSort(col)}
style={{
padding: props.rows.padding,
fontWeight: props.rows.headerBold ? "bold" : "normal"
}}
style={props.headers.style}
>
<div class="fs-multi-colhead" style={props.headers.style}>
{column.sortKey && (
@ -305,7 +301,7 @@ export default class MultiTable extends Component<Props, State> {
class={`fs-multi-${col}`}
style={{
borderBottom: `1px solid ${props.rows.dividersColor}`,
padding: props.rows.padding
...props.rows.style
}}
>
{COLUMNS[col].renderItem(asset)}