Skip to content

Commit e701c71

Browse files
authored
examples(with-ant-design): bump antd v5.0.0 (#43062)
1 parent b94b5be commit e701c71

File tree

3 files changed

+26
-12
lines changed

3 files changed

+26
-12
lines changed

examples/with-ant-design/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"start": "next start"
77
},
88
"dependencies": {
9-
"@ant-design/icons": "^4.7.0",
10-
"antd": "^4.21.5",
9+
"@ant-design/icons": "^4.8.0",
10+
"antd": "^5.0.0",
1111
"next": "latest",
1212
"react": "18.2.0",
1313
"react-dom": "18.2.0"

examples/with-ant-design/pages/_app.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { AppProps } from 'next/app'
2-
import 'antd/dist/antd.css'
2+
import 'antd/dist/reset.css'
33
import '../styles/vars.css'
44
import '../styles/global.css'
55

examples/with-ant-design/pages/index.tsx

+23-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { SmileFilled } from '@ant-design/icons'
1212
import Link from 'next/link'
1313

1414
const FormItem = Form.Item
15-
const Option = Select.Option
1615

1716
const content = {
1817
marginTop: '100px',
@@ -61,14 +60,29 @@ export default function Home() {
6160
</FormItem>
6261

6362
<FormItem label="Select">
64-
<Select defaultValue="lucy" style={{ width: 192 }}>
65-
<Option value="jack">jack</Option>
66-
<Option value="lucy">lucy</Option>
67-
<Option value="disabled" disabled>
68-
disabled
69-
</Option>
70-
<Option value="yiminghe">yiminghe</Option>
71-
</Select>
63+
<Select
64+
defaultValue="lucy"
65+
style={{ width: 192 }}
66+
options={[
67+
{
68+
value: 'jack',
69+
label: 'Jack',
70+
},
71+
{
72+
value: 'lucy',
73+
label: 'Lucy',
74+
},
75+
{
76+
value: 'disabled',
77+
disabled: true,
78+
label: 'Disabled',
79+
},
80+
{
81+
value: 'Yiminghe',
82+
label: 'yiminghe',
83+
},
84+
]}
85+
/>
7286
</FormItem>
7387

7488
<FormItem label="DatePicker">

0 commit comments

Comments
 (0)