Skip to content

Commit 7565ed7

Browse files
authored
feat: update v4 theme (#158)
* feat: update v4 theme * chore: fix test
1 parent c96e5b1 commit 7565ed7

File tree

3 files changed

+16
-15
lines changed

3 files changed

+16
-15
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
},
2626
"scripts": {
2727
"start": "dumi dev",
28+
"dev": "father dev",
2829
"docs:build": "dumi build",
2930
"docs:deploy": "gh-pages -d docs-dist",
3031
"compile": "father build",

src/theme/index.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ export const defaultTheme: ThemeConfig = {
1313
algorithm: defaultAlgorithm,
1414
components: {
1515
Menu: {
16-
radiusItem: 0,
17-
radiusSubMenuItem: 0,
18-
colorItemTextHover: '#1890ff',
19-
colorItemTextSelected: '#1890ff',
20-
colorItemBgSelected: '#e6f7ff',
21-
colorActiveBarWidth: 3,
16+
itemBorderRadius: 0,
17+
subMenuItemBorderRadius: 0,
18+
itemHoverColor: '#1890ff',
19+
itemSelectedColor: '#1890ff',
20+
itemSelectedBg: '#e6f7ff',
21+
activeBarWidth: 3,
2222
itemMarginInline: 0,
23-
colorItemBgHover: 'transparent',
23+
itemHoverBg: 'transparent',
2424
},
2525
},
2626
}
@@ -30,14 +30,14 @@ export const darkTheme: ThemeConfig = {
3030
algorithm: darkAlgorithm,
3131
components: {
3232
Menu: {
33-
radiusItem: 0,
34-
radiusSubMenuItem: 0,
35-
colorItemTextHover: '#1890ff',
36-
colorItemTextSelected: '#1890ff',
37-
colorItemBgSelected: '#111b26',
38-
colorActiveBarWidth: 3,
33+
itemBorderRadius: 0,
34+
subMenuItemBorderRadius: 0,
35+
itemHoverColor: 'transparent',
36+
itemSelectedColor: '#1890ff',
37+
itemSelectedBg: '#111b26',
38+
activeBarWidth: 3,
3939
itemMarginInline: 0,
40-
colorItemBgHover: 'transparent',
40+
itemHoverBg: 'transparent',
4141
},
4242
},
4343
}

tests/less.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe('Less', () => {
3939
const legacyToken = convertLegacyToken(mapToken);
4040

4141
// Value exist check
42-
expect(legacyToken['line-height-base']).toEqual(`${mapToken.lineHeights[1]}`);
42+
expect(legacyToken['line-height-base']).toEqual(`${mapToken.lineHeight}`);
4343
expect(legacyToken['border-radius-base']).toEqual(`${mapToken.borderRadius}px`);
4444

4545
// Less compile check

0 commit comments

Comments
 (0)