Commit ace748dc authored by starriv's avatar starriv Committed by Tim Neutkens

More elegant application of antd (#2840)

* Update .babelrc

* Create index.js

* Update index.js

* Update index.js

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Fix linting errors
parent aa096257
{ {
"presets": [ "presets": ["next/babel"],
"next/babel"
],
"plugins": [ "plugins": [
["import", { "transform-decorators-legacy",
"libraryName": "antd" [
}] "import",
{
"libraryName": "antd",
"style": false
}
]
] ]
} }
import Head from 'next/head'
export default ({ children }) =>
<div>
<Head>
<meta name='viewport' content='width=device-width, initial-scale=1' />
<meta charSet='utf-8' />
<link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/antd/2.9.3/antd.min.css' />
</Head>
<style jsx global>{`
body {
}
`}</style>
{children}
</div>
import Head from 'next/head' import Layout from '../index.js'
import { Form, Select, InputNumber, DatePicker, Switch, Slider, Button, LocaleProvider } from 'antd' import { Form, Select, InputNumber, DatePicker, Switch, Slider, Button, LocaleProvider } from 'antd'
import enUS from 'antd/lib/locale-provider/en_US' import enUS from 'antd/lib/locale-provider/en_US'
...@@ -6,11 +6,9 @@ const FormItem = Form.Item ...@@ -6,11 +6,9 @@ const FormItem = Form.Item
const Option = Select.Option const Option = Select.Option
export default () => ( export default () => (
<Layout>
<LocaleProvider locale={enUS}> <LocaleProvider locale={enUS}>
<div style={{ marginTop: 100 }}> <div style={{ marginTop: 100 }}>
<Head>
<link rel='stylesheet' href='//cdnjs.cloudflare.com/ajax/libs/antd/2.9.3/antd.min.css' />
</Head>
<Form layout='horizontal'> <Form layout='horizontal'>
<FormItem <FormItem
label='Input Number' label='Input Number'
...@@ -71,4 +69,5 @@ export default () => ( ...@@ -71,4 +69,5 @@ export default () => (
</Form> </Form>
</div> </div>
</LocaleProvider> </LocaleProvider>
</Layout>
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment