Skip to content

Commit 8a7f87f

Browse files
Merge pull request #3872 from OneCommunityGlobal/feat/css-modules-totalorgsummary
Sai Siri Sudheeksha Vavila: Switch /totalorgsummary to CSS Modules an…
2 parents 77d07da + a20ec46 commit 8a7f87f

7 files changed

Lines changed: 487 additions & 353 deletions

File tree

package-lock.json

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

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"chart.js": "^4.1.1",
3939
"chartjs-plugin-datalabels": "^2.2.0",
4040
"classnames": "^2.2.6",
41+
"clsx": "^2.1.1",
4142
"cross-spawn": "^7.0.6",
4243
"crypto-browserify": "^3.12.1",
4344
"d3": "^7.8.5",

src/components/TotalOrgSummary/NumbersVolunteerWorked/NumbersVolunteerWorked.jsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
import '../TotalOrgSummary.css';
2-
1+
import styles from '../TotalOrgSummary.module.css';
2+
import cx from 'clsx';
33
export default function NumbersVolunteerWorked({ isLoading, data, darkMode }) {
44
return (
55
<div>
66
<p
7-
className={`${
8-
darkMode ? 'text-light' : 'text-dark'
9-
} component-border component-pie-chart-label p-2`}
7+
data-pdf-label
8+
className={cx(
9+
darkMode ? 'text-light' : 'text-dark',
10+
styles.componentBorder,
11+
styles.componentPieChartLabel,
12+
'p-2',
13+
)}
1014
>
11-
{isLoading ? '...' : data.count} Volunteers worked 1+ hours over assigned time
15+
{isLoading ? '...' : data?.count ?? 0} Volunteers worked 1+ hours over assigned time
1216
</p>
1317
</div>
1418
);

0 commit comments

Comments
 (0)