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
a6af11c6
Commit
a6af11c6
authored
Mar 23, 2018
by
Luke Plaster
Committed by
Tim Neutkens
Mar 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved with-ant-design example (#4034)
* Improved with-ant-design example * standardjs fix maybe
parent
9470b91b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
11 deletions
+20
-11
.babelrc
examples/with-ant-design/.babelrc
+1
-1
index.js
examples/with-ant-design/index.js
+1
-1
next.config.js
examples/with-ant-design/next.config.js
+8
-0
package.json
examples/with-ant-design/package.json
+2
-1
index.js
examples/with-ant-design/pages/index.js
+8
-8
No files found.
examples/with-ant-design/.babelrc
View file @
a6af11c6
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
"import",
"import",
{
{
"libraryName": "antd",
"libraryName": "antd",
"style":
false
"style":
"css"
}
}
]
]
]
]
...
...
examples/with-ant-design/index.js
View file @
a6af11c6
...
@@ -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
=
'
https://unpkg.com/antd@3/dist/antd.min
.css'
/>
<
link
rel
=
'stylesheet'
href
=
'
/_next/static/style
.css'
/>
<
/Head
>
<
/Head
>
<
style
jsx
global
>
{
`
<
style
jsx
global
>
{
`
body {
body {
...
...
examples/with-ant-design/next.config.js
0 → 100644
View file @
a6af11c6
const
withCss
=
require
(
'@zeit/next-css'
)
// fix: prevents error when .css files are required by node
if
(
typeof
require
!==
'undefined'
)
{
require
.
extensions
[
'.css'
]
=
(
file
)
=>
{}
}
module
.
exports
=
withCss
()
examples/with-ant-design/package.json
View file @
a6af11c6
...
@@ -7,7 +7,8 @@
...
@@ -7,7 +7,8 @@
"start"
:
"next start"
"start"
:
"next start"
},
},
"dependencies"
:
{
"dependencies"
:
{
"antd"
:
"^3.0.2"
,
"@zeit/next-css"
:
"^0.1.4"
,
"antd"
:
"^3.3.1"
,
"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 @
a6af11c6
...
@@ -12,7 +12,7 @@ export default () => (
...
@@ -12,7 +12,7 @@ export default () => (
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
>
...
@@ -21,7 +21,7 @@ export default () => (
...
@@ -21,7 +21,7 @@ export default () => (
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
>
...
@@ -29,7 +29,7 @@ export default () => (
...
@@ -29,7 +29,7 @@ export default () => (
label
=
'Slider'
label
=
'Slider'
labelCol
=
{{
span
:
8
}}
labelCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
wrapperCol
=
{{
span
:
8
}}
>
>
<
Slider
defaultValue
=
{
70
}
/
>
<
Slider
defaultValue
=
{
70
}
/
>
<
/FormItem
>
<
/FormItem
>
...
@@ -37,7 +37,7 @@ export default () => (
...
@@ -37,7 +37,7 @@ export default () => (
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
>
...
@@ -50,19 +50,19 @@ export default () => (
...
@@ -50,19 +50,19 @@ export default () => (
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
>
...
...
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