Skip to content

Commit b9ce2be

Browse files
authored
Merge pull request #236 from fedspendingtransparency/mod/12430
Mod/12430
2 parents d3d3195 + cb4d434 commit b9ce2be

File tree

137 files changed

+166
-115
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

137 files changed

+166
-115
lines changed

components/table/Table.jsx

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const propTypes = {
3636
onClickHandler: PropTypes.func,
3737
isMobile: PropTypes.bool,
3838
stickyFirstColumn: PropTypes.bool,
39-
subAward: PropTypes.bool,
39+
highlightedColumns: PropTypes.object,
4040
atMaxLevel: PropTypes.bool
4141
};
4242

@@ -58,7 +58,10 @@ const Table = ({
5858
onClickHandler,
5959
isMobile,
6060
stickyFirstColumn = false,
61-
subAward,
61+
highlightedColumns = {
62+
standardColumns: 9,
63+
highlightedColumns: 7
64+
},
6265
atMaxLevel = false
6366
}) => {
6467
const stackedClass = isStacked ? `usa-dt-table__stacked` : '';
@@ -116,7 +119,7 @@ const Table = ({
116119
onClickHandler={onClickHandler}
117120
isMobile={isMobile}
118121
stickyFirstColumn={stickyFirstColumn}
119-
subAward={subAward}
122+
highlightedColumns={highlightedColumns}
120123
isStacked={isStacked}
121124
atMaxLevel={atMaxLevel} />
122125
);
@@ -138,11 +141,11 @@ const Table = ({
138141
{screenReaderCaption && (
139142
<caption className="usa-dt-sr-only">{screenReaderCaption}</caption>
140143
)}
141-
{subAward
144+
{highlightedColumns
142145
&& (
143146
<colgroup>
144-
<col span={4} />
145-
<col span={4} className="usda-table__body-special-color" />
147+
<col span={highlightedColumns.standardColumns} />
148+
<col span={highlightedColumns.highlightedColumns} className="usda-table__body-special-color" />
146149
</colgroup>
147150
)}
148151
<thead className="usda-table__head">
@@ -153,7 +156,7 @@ const Table = ({
153156
currentSort={currentSort}
154157
updateSort={updateSort}
155158
stickyFirstColumn={stickyFirstColumn}
156-
subAward={subAward}
159+
highlightedColumns={highlightedColumns}
157160
index={index}
158161
{...col} />
159162
))}

components/table/TableData.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const propTypes = {
2121
isMobile: PropTypes.bool,
2222
atMaxLevel: PropTypes.bool,
2323
stickyFirstColumn: PropTypes.bool,
24-
subAward: PropTypes.bool,
24+
highlightedColumns: PropTypes.object,
2525
isStacked: PropTypes.bool
2626
};
2727

@@ -35,7 +35,7 @@ const TableData = ({
3535
isMobile,
3636
atMaxLevel,
3737
stickyFirstColumn = false,
38-
subAward,
38+
highlightedColumns,
3939
isStacked
4040
}) => {
4141
const [firstClick, setFirstClick] = useState(false);
@@ -102,7 +102,7 @@ const TableData = ({
102102
localClickHandler(row, i);
103103
}
104104
}}
105-
className={`usda-table__row-item usda-table__row${oddClass} ${rowIndexForMessage === i ? 'selected-row' : ''} ${subAward ? 'special-hover-color' : ''}`}
105+
className={`usda-table__row-item usda-table__row${oddClass} ${rowIndexForMessage === i ? 'selected-row' : ''} ${highlightedColumns ? `special-hover-color-${highlightedColumns.highlightedColumns}` : ''}`}
106106
style={{ height: rowHeight }}>
107107
{row.map((data, j) => (
108108
columns[j]?.bodyHeader

components/table/TableHeader.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const propTypes = {
6969
bodyHeader: PropTypes.bool,
7070
stickyFirstColumn: PropTypes.bool,
7171
columnWidth: PropTypes.number,
72-
subAward: PropTypes.bool,
72+
highlightedColumns: PropTypes.object,
7373
index: PropTypes.number
7474
};
7575

@@ -87,7 +87,7 @@ const TableHeaderCell = ({
8787
bodyHeader = false,
8888
stickyFirstColumn = false,
8989
columnWidth,
90-
subAward,
90+
highlightedColumns,
9191
index
9292
}) => {
9393
const handleClickedSort = (e, sortOn = title) => {
@@ -102,7 +102,7 @@ const TableHeaderCell = ({
102102
return (
103103
<th
104104
className={`${className} table-header${bodyHeader ? ' table-header_body-header' : ''}
105-
${stickyFirstColumn && index === 0 ? ' stickyColumn' : ''} ${subAward ? 'table-header__subaward-color' : ''}`}
105+
${stickyFirstColumn && index === 0 ? ' stickyColumn' : ''} ${highlightedColumns ? `table-header__subaward-color-${highlightedColumns.highlightedColumns}` : ''}`}
106106
style={{ minWidth: columnWidth }}
107107
colSpan={columnWidth ? '' : columnSpan}
108108
rowSpan={rowsSpan()}

dist/data-transparency-ui.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/1051.0343aa87.iframe.bundle.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/1051.70b999ac.iframe.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/2159.313852ea.iframe.bundle.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/2159.d6cd2536.iframe.bundle.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)