Skip to content

Commit f54badf

Browse files
authored
Merge pull request #133 from rcpch/mbarton/chromatic
Add Chromatic
2 parents db53580 + b47469a commit f54badf

9 files changed

+138
-3
lines changed

.github/workflows/chromatic.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Chromatic recommend having this on "push" so we have it as a separate workflow
2+
# https://www.chromatic.com/docs/github-actions/#recommended-configuration-for-build-events
3+
4+
name: "Chromatic"
5+
6+
on: push
7+
8+
jobs:
9+
chromatic:
10+
name: Run Chromatic
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: 20
20+
- name: Install dependencies
21+
run: npm ci
22+
- name: Run Chromatic
23+
uses: chromaui/action@latest
24+
with:
25+
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
26+
exitZeroOnChanges: true
27+
exitOnceUploaded: true

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ storybook-static/
66
.vscode
77

88
src/chartdata/fenton/*.*
9-
src/testParameters/measurements/fenton/*.*
9+
src/testParameters/measurements/fenton/*.*
10+
11+
build-storybook.log

package-lock.json

+27-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"@types/react": "18.2.55",
6767
"@types/styled-components": "5.1.34",
6868
"autoprefixer": "10.4.20",
69+
"chromatic": "11.18.0",
6970
"eslint-config-prettier": "9.1.0",
7071
"eslint-plugin-prettier": "5.2.1",
7172
"eslint-plugin-storybook": "^0.6.15",

src/testParameters/styles/tanner1Styles.ts

+16
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,20 @@ export const Tanner1Styles = {
322322
size: 14,
323323
style: 'normal',
324324
},
325+
toggleTooltipStyle: {
326+
backgroundColor: '#333',
327+
color: '#fff',
328+
fontSize: 14,
329+
fontFamily: 'Montserrat',
330+
fontWeight: 400,
331+
fontStyle: 'regular',
332+
borderRadius: 4
333+
},
334+
referenceTextStyle: {
335+
fontSize: 8,
336+
fontFamily: 'Arial',
337+
color: '#000000',
338+
fontWeight: 200,
339+
fontStyle: 'normal',
340+
}
325341
};

src/testParameters/styles/tanner2Styles.ts

+16
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,20 @@ export const Tanner2Styles = {
322322
size: 14,
323323
style: 'normal',
324324
},
325+
toggleTooltipStyle: {
326+
backgroundColor: '#333',
327+
color: '#fff',
328+
fontSize: 14,
329+
fontFamily: 'Montserrat',
330+
fontWeight: 400,
331+
fontStyle: 'regular',
332+
borderRadius: 4
333+
},
334+
referenceTextStyle: {
335+
fontSize: 8,
336+
fontFamily: 'Arial',
337+
color: '#000000',
338+
fontWeight: 200,
339+
fontStyle: 'normal',
340+
}
325341
};

src/testParameters/styles/tanner3Styles.ts

+16
Original file line numberDiff line numberDiff line change
@@ -322,4 +322,20 @@ export const Tanner3Styles = {
322322
size: 14,
323323
style: 'normal',
324324
},
325+
toggleTooltipStyle: {
326+
backgroundColor: '#333',
327+
color: '#fff',
328+
fontSize: 14,
329+
fontFamily: 'Montserrat',
330+
fontWeight: 400,
331+
fontStyle: 'regular',
332+
borderRadius: 4
333+
},
334+
referenceTextStyle: {
335+
fontSize: 8,
336+
fontFamily: 'Arial',
337+
color: '#000000',
338+
fontWeight: 200,
339+
fontStyle: 'normal',
340+
}
325341
};

src/testParameters/styles/traditionalBoysStyles.ts

+16
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,20 @@ export const traditionalBoysStyles = {
321321
size: 14,
322322
style: 'normal',
323323
},
324+
toggleTooltipStyle: {
325+
backgroundColor: '#333',
326+
color: '#fff',
327+
fontSize: 14,
328+
fontFamily: 'Montserrat',
329+
fontWeight: 400,
330+
fontStyle: 'regular',
331+
borderRadius: 4
332+
},
333+
referenceTextStyle: {
334+
fontSize: 8,
335+
fontFamily: 'Arial',
336+
color: '#000000',
337+
fontWeight: 200,
338+
fontStyle: 'normal',
339+
}
324340
};

src/testParameters/styles/traditionalGirlsStyles.ts

+16
Original file line numberDiff line numberDiff line change
@@ -321,4 +321,20 @@ export const traditionalGirlsStyles = {
321321
size: 14,
322322
weight: 'normal',
323323
},
324+
toggleTooltipStyle: {
325+
backgroundColor: '#333',
326+
color: '#fff',
327+
fontSize: 14,
328+
fontFamily: 'Montserrat',
329+
fontWeight: 400,
330+
fontStyle: 'regular',
331+
borderRadius: 4
332+
},
333+
referenceTextStyle: {
334+
fontSize: 8,
335+
fontFamily: 'Arial',
336+
color: '#000000',
337+
fontWeight: 200,
338+
fontStyle: 'normal',
339+
}
324340
};

0 commit comments

Comments
 (0)