Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
9263ad13
Commit
9263ad13
authored
Jan 06, 2018
by
Wei Zhu
Committed by
Tim Neutkens
Jan 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Ant Design example (#3485)
parent
57a0fc43
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
62 deletions
+59
-62
index.js
examples/with-ant-design/index.js
+1
-1
package.json
examples/with-ant-design/package.json
+1
-1
index.js
examples/with-ant-design/pages/index.js
+57
-60
No files found.
examples/with-ant-design/index.js
View file @
9263ad13
...
@@ -4,7 +4,7 @@ export default ({ children }) =>
...
@@ -4,7 +4,7 @@ export default ({ children }) =>
<
Head
>
<
Head
>
<
meta
name
=
'viewport'
content
=
'width=device-width, initial-scale=1'
/>
<
meta
name
=
'viewport'
content
=
'width=device-width, initial-scale=1'
/>
<
meta
charSet
=
'utf-8'
/>
<
meta
charSet
=
'utf-8'
/>
<
link
rel
=
'stylesheet'
href
=
'
//cdnjs.cloudflare.com/ajax/libs/antd/2.9.3
/antd.min.css'
/>
<
link
rel
=
'stylesheet'
href
=
'
https://unpkg.com/antd@3/dist
/antd.min.css'
/>
<
/Head
>
<
/Head
>
<
style
jsx
global
>
{
`
<
style
jsx
global
>
{
`
body {
body {
...
...
examples/with-ant-design/package.json
View file @
9263ad13
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
"start"
:
"next start"
"start"
:
"next start"
},
},
"dependencies"
:
{
"dependencies"
:
{
"antd"
:
"^
2.1
0.2"
,
"antd"
:
"^
3.
0.2"
,
"babel-plugin-import"
:
"^1.1.1"
,
"babel-plugin-import"
:
"^1.1.1"
,
"next"
:
"latest"
,
"next"
:
"latest"
,
"react"
:
"^16.0.0"
,
"react"
:
"^16.0.0"
,
...
...
examples/with-ant-design/pages/index.js
View file @
9263ad13
import
Layout
from
'../index.js'
import
Layout
from
'../index.js'
import
{
Form
,
Select
,
InputNumber
,
DatePicker
,
Switch
,
Slider
,
Button
,
LocaleProvider
}
from
'antd'
import
{
Form
,
Select
,
InputNumber
,
DatePicker
,
Switch
,
Slider
,
Button
}
from
'antd'
import
enUS
from
'antd/lib/locale-provider/en_US'
const
FormItem
=
Form
.
Item
const
FormItem
=
Form
.
Item
const
Option
=
Select
.
Option
const
Option
=
Select
.
Option
export
default
()
=>
(
export
default
()
=>
(
<
Layout
>
<
Layout
>
<
LocaleProvider
locale
=
{
enUS
}
>
<
div
style
=
{{
marginTop
:
100
}}
>
<
div
style
=
{{
marginTop
:
100
}}
>
<
Form
layout
=
'horizontal'
>
<
Form
layout
=
'horizontal'
>
<
FormItem
<
FormItem
label
=
'Input Number'
label
=
'Input Number'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
InputNumber
size
=
'large'
min
=
{
1
}
max
=
{
10
}
style
=
{{
width
:
100
}}
defaultValue
=
{
3
}
name
=
'inputNumber'
/>
<
InputNumber
size
=
'large'
min
=
{
1
}
max
=
{
10
}
style
=
{{
width
:
100
}}
defaultValue
=
{
3
}
name
=
'inputNumber'
/>
<
a
href
=
'#'
>
Link
<
/a
>
<
a
href
=
'#'
>
Link
<
/a
>
<
/FormItem
>
<
/FormItem
>
<
FormItem
<
FormItem
label
=
'Switch'
label
=
'Switch'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
Switch
defaultChecked
name
=
'switch'
/>
<
Switch
defaultChecked
name
=
'switch'
/>
<
/FormItem
>
<
/FormItem
>
<
FormItem
<
FormItem
label
=
'Slider'
label
=
'Slider'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
Slider
defaultValue
=
{
70
}
/
>
<
Slider
defaultValue
=
{
70
}
/
>
<
/FormItem
>
<
/FormItem
>
<
FormItem
<
FormItem
label
=
'Select'
label
=
'Select'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
Select
size
=
'large'
defaultValue
=
'lucy'
style
=
{{
width
:
192
}}
name
=
'select'
>
<
Select
size
=
'large'
defaultValue
=
'lucy'
style
=
{{
width
:
192
}}
name
=
'select'
>
<
Option
value
=
'jack'
>
jack
<
/Option
>
<
Option
value
=
'jack'
>
jack
<
/Option
>
<
Option
value
=
'lucy'
>
lucy
<
/Option
>
<
Option
value
=
'lucy'
>
lucy
<
/Option
>
<
Option
value
=
'disabled'
disabled
>
disabled
<
/Option
>
<
Option
value
=
'disabled'
disabled
>
disabled
<
/Option
>
<
Option
value
=
'yiminghe'
>
yiminghe
<
/Option
>
<
Option
value
=
'yiminghe'
>
yiminghe
<
/Option
>
<
/Select
>
<
/Select
>
<
/FormItem
>
<
/FormItem
>
<
FormItem
<
FormItem
label
=
'DatePicker'
label
=
'DatePicker'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
DatePicker
name
=
'startDate'
/>
<
DatePicker
name
=
'startDate'
/>
<
/FormItem
>
<
/FormItem
>
<
FormItem
<
FormItem
style
=
{{
marginTop
:
48
}}
style
=
{{
marginTop
:
48
}}
wrapperCol
=
{{
span
:
8
,
offset
:
8
}}
wrapperCol
=
{{
span
:
8
,
offset
:
8
}}
>
>
<
Button
size
=
'large'
type
=
'primary'
htmlType
=
'submit'
>
<
Button
size
=
'large'
type
=
'primary'
htmlType
=
'submit'
>
OK
OK
<
/Button
>
<
/Button
>
<
Button
size
=
'large'
style
=
{{
marginLeft
:
8
}}
>
<
Button
size
=
'large'
style
=
{{
marginLeft
:
8
}}
>
Cancel
Cancel
<
/Button
>
<
/Button
>
<
/FormItem
>
<
/FormItem
>
<
/Form
>
<
/Form
>
<
/div
>
<
/div
>
<
/LocaleProvider
>
<
/Layout
>
<
/Layout
>
)
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment