@bloom-housing/ui-components 5.1.1-alpha.27 → 5.1.1-alpha.29
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.
- package/CHANGELOG.md +19 -0
- package/package.json +2 -2
- package/src/tables/StandardTable.tsx +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [5.1.1-alpha.29](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.28...@bloom-housing/ui-components@5.1.1-alpha.29) (2022-09-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [5.1.1-alpha.28](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.27...@bloom-housing/ui-components@5.1.1-alpha.28) (2022-09-19)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* add confirm modal when copying a preference ([#3041](https://github.com/bloom-housing/bloom/issues/3041)) ([b3d69e9](https://github.com/bloom-housing/bloom/commit/b3d69e9b557998489c828c86ff742c91feca799f))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [5.1.1-alpha.27](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.26...@bloom-housing/ui-components@5.1.1-alpha.27) (2022-09-16)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @bloom-housing/ui-components
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "5.1.1-alpha.
|
|
3
|
+
"version": "5.1.1-alpha.29",
|
|
4
4
|
"author": "Sean Albert <sean.albert@exygy.com>",
|
|
5
5
|
"description": "Shared user interface components for Bloom affordable housing system",
|
|
6
6
|
"homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"ts-jest": "^26.4.1",
|
|
111
111
|
"typesafe-actions": "^5.1.0"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "1dae8aeb6a65694cfd7c0637a7164e75a1810f87"
|
|
114
114
|
}
|
|
@@ -51,6 +51,8 @@ export type StandardTableCell = {
|
|
|
51
51
|
content: React.ReactNode
|
|
52
52
|
/** Text content that will replace this cell's header on mobile views */
|
|
53
53
|
mobileReplacement?: string
|
|
54
|
+
/** Classname to apply to this row */
|
|
55
|
+
rowClass?: string
|
|
54
56
|
}
|
|
55
57
|
|
|
56
58
|
export type StandardTableData = Record<string, StandardTableCell>[]
|
|
@@ -135,9 +137,11 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
135
137
|
? `standardrow-${dataIndex}`
|
|
136
138
|
: nanoid()
|
|
137
139
|
|
|
140
|
+
let rowClass: string | undefined = ""
|
|
138
141
|
const cols = Object.keys(headers)?.map((colKey, colIndex) => {
|
|
139
142
|
const uniqKey = process.env.NODE_ENV === "test" ? `standardcol-${colIndex}` : nanoid()
|
|
140
143
|
const cell = row[colKey]?.content
|
|
144
|
+
rowClass = row[colKey]?.rowClass ? row[colKey].rowClass : ""
|
|
141
145
|
|
|
142
146
|
const cellClass = [headerClassName(headers[colKey]), cellClassName].join(" ")
|
|
143
147
|
|
|
@@ -201,7 +205,7 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
201
205
|
)}
|
|
202
206
|
</Draggable>
|
|
203
207
|
) : (
|
|
204
|
-
<tr id={rowKey} key={rowKey}>
|
|
208
|
+
<tr id={rowKey} key={rowKey} className={rowClass ? rowClass : ""}>
|
|
205
209
|
{cols}
|
|
206
210
|
</tr>
|
|
207
211
|
)}
|