Skip to content

Commit 00a2fca

Browse files
committed
feat: add style validator for themeColor
Signed-off-by: lileirjyb <[email protected]>
1 parent 9a4b7da commit 00a2fca

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

packages/hap-compiler/src/style/validator.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2656,7 +2656,24 @@ const validatorMap = {
26562656
starSecondary: validator.url,
26572657
// font
26582658
fontSrc: validator.fontSrc,
2659-
fontFamily: validator.fontFamily
2659+
fontFamily: validator.fontFamily,
2660+
themeColor: makeEnumValidator([
2661+
'uxCardColorTheme',
2662+
'uxCardColorAccent',
2663+
'uxCardColorPrimary',
2664+
'uxCardColorSecondary',
2665+
'uxCardColorSecondaryVariant',
2666+
'uxCardColorTertiary',
2667+
'uxCardColorQuaternary',
2668+
'uxCardColorContainer',
2669+
'uxCardBackground',
2670+
'uxCardColorHue',
2671+
'uxCardColorHueSecondary',
2672+
'uxIconColorAccent',
2673+
'uxIconColorPrimary',
2674+
'uxIconColorSecondary',
2675+
'uxIconColorBackground'
2676+
])
26602677
}
26612678

26622679
/**

packages/integration-tests/hap.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe('hap-toolkit', () => {
5353
expect(stderr.toString()).toMatch(/Please pick a new name/)
5454
await del([targetdirForExist, targetdirForNonExist], { force: true })
5555
},
56-
10 * 60 * 1000
56+
100 * 60 * 1000
5757
)
5858

5959
it(

0 commit comments

Comments
 (0)