@longline/aqua-ui 1.0.279 → 1.0.280
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.
|
@@ -55,6 +55,14 @@ interface IColumnProps {
|
|
|
55
55
|
* Is this column in an error state?
|
|
56
56
|
*/
|
|
57
57
|
error?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Override default left padding
|
|
60
|
+
*/
|
|
61
|
+
paddingLeft?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Override default left padding
|
|
64
|
+
*/
|
|
65
|
+
paddingRight?: number;
|
|
58
66
|
}
|
|
59
67
|
/**
|
|
60
68
|
* TableColumn species a column name, and how to render content for that
|
|
@@ -81,7 +81,7 @@ var Body = React.forwardRef(function (props, ref) {
|
|
|
81
81
|
props.onCheck(props.data, props.data[i]);
|
|
82
82
|
} })),
|
|
83
83
|
props.columns.map(function (col, index) {
|
|
84
|
-
return React.createElement("div", { className: "cell ".concat(col.error || item.error ? 'error' : ''), key: index, style: { justifyContent: col.align == 'right' ? 'end' : 'start' } },
|
|
84
|
+
return React.createElement("div", { className: "cell ".concat(col.error || item.error ? 'error' : ''), key: index, style: { justifyContent: col.align == 'right' ? 'end' : 'start', paddingLeft: col.paddingLeft ? "".concat(col.paddingLeft, "px") : null, paddingRight: col.paddingRight ? "".concat(col.paddingRight, "px") : null } },
|
|
85
85
|
React.createElement("span", { className: "content" },
|
|
86
86
|
" ",
|
|
87
87
|
col.children(item)),
|
|
@@ -23,7 +23,9 @@ var HeaderCellBase = function (props) {
|
|
|
23
23
|
// Sorted column gets .sorted class:
|
|
24
24
|
className: "".concat(props.className, " cell ").concat(sorted ? 'sort' : ''), style: {
|
|
25
25
|
// Sortable column has pointer cursor:
|
|
26
|
-
cursor: props.column.sort ? 'pointer' : 'auto'
|
|
26
|
+
cursor: props.column.sort ? 'pointer' : 'auto',
|
|
27
|
+
paddingLeft: props.column.paddingLeft ? "".concat(props.column.paddingLeft, "px") : null,
|
|
28
|
+
paddingRight: props.column.paddingRight ? "".concat(props.column.paddingRight, "px") : null,
|
|
27
29
|
}, onClick: (props.column.sort && props.onSortClick) ? function () { return props.onSortClick(props.column); } : null },
|
|
28
30
|
React.createElement(Label, null, (_a = props.column.label) !== null && _a !== void 0 ? _a : props.column.name),
|
|
29
31
|
props.column.sort && React.createElement(SortButton, { dark: props.dark, active: sorted,
|