Skip to content

Commit 80eb24a

Browse files
author
汤睿甲
committed
test(unplugin-react): add example to test theme changes component styles
1 parent e2bd23c commit 80eb24a

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

examples/rspack-react/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"@rspack/cli": "^0.1.8"
1414
},
1515
"dependencies": {
16+
"@arco-design/theme-christmas": "^0.0.18",
1617
"@arco-design/web-react": "^2.47.1",
1718
"@arco-iconbox/react-partial-bits": "^0.0.3",
1819
"@arco-plugins/unplugin-react": "workspace:*",
19-
"@arco-themes/react-asuka": "^0.0.1",
2020
"example-component-a": "workspace:*",
2121
"ky": "^0.33.3",
2222
"react": "^18.2.0",

examples/rspack-react/rspack.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module.exports = {
4949
},
5050
plugins: [
5151
new ArcoDesignPlugin({
52-
theme: '@arco-themes/react-asuka',
52+
theme: path.resolve(__dirname, 'node_modules/@arco-design/theme-christmas'),
5353
iconBox: '@arco-iconbox/react-partial-bits',
5454
removeFontFace: true,
5555
defaultLanguage: 'ja-JP',

examples/rspack-react/src/App.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function App() {
2222
<ol>
2323
<Space direction="vertical" size="large">
2424
<li>
25-
<p>The color of button should be orange (theme: '@arco-themes/react-asuka'):</p>
25+
<p>The button should be the Christmas style (theme: '@arco-design/theme-christmas'):</p>
2626
<Button type="primary">Button</Button>
2727
</li>
2828
<li>

yarn.lock

+10-10
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ __metadata:
3434
languageName: node
3535
linkType: hard
3636

37+
"@arco-design/theme-christmas@npm:^0.0.18":
38+
version: 0.0.18
39+
resolution: "@arco-design/theme-christmas@npm:0.0.18"
40+
peerDependencies:
41+
"@arco-design/web-react": ^2.26.0
42+
checksum: 4f4e4da648c1cee14bafc5e434dfa8d92b1a966dabbcd83090d80a3e4da4c4dfe219866257bbb3d493dccd49612d00b55bc0a39cee4e6ed9f53e02a2658d63a6
43+
languageName: node
44+
linkType: hard
45+
3746
"@arco-design/web-react@npm:^2.35.1":
3847
version: 2.35.1
3948
resolution: "@arco-design/web-react@npm:2.35.1"
@@ -194,15 +203,6 @@ __metadata:
194203
languageName: unknown
195204
linkType: soft
196205

197-
"@arco-themes/react-asuka@npm:^0.0.1":
198-
version: 0.0.1
199-
resolution: "@arco-themes/react-asuka@npm:0.0.1"
200-
peerDependencies:
201-
"@arco-design/web-react": ^2.47.1
202-
checksum: 051970e604273a997988bb9723d55df070b06ab19c605beaf98d91d25d9f632d575de9d6d06774d2570839d74665c7b5807802a6c43ae04e22e473251c725f51
203-
languageName: node
204-
linkType: hard
205-
206206
"@arco-themes/react-plugin-test@npm:^0.0.1":
207207
version: 0.0.1
208208
resolution: "@arco-themes/react-plugin-test@npm:0.0.1"
@@ -7505,10 +7505,10 @@ __metadata:
75057505
version: 0.0.0-use.local
75067506
resolution: "example-rspack-react@workspace:examples/rspack-react"
75077507
dependencies:
7508+
"@arco-design/theme-christmas": ^0.0.18
75087509
"@arco-design/web-react": ^2.47.1
75097510
"@arco-iconbox/react-partial-bits": ^0.0.3
75107511
"@arco-plugins/unplugin-react": "workspace:*"
7511-
"@arco-themes/react-asuka": ^0.0.1
75127512
"@rspack/cli": ^0.1.8
75137513
example-component-a: "workspace:*"
75147514
ky: ^0.33.3

0 commit comments

Comments
 (0)