Update README.md

This commit is contained in:
afc163 2016-05-23 22:56:42 +08:00
parent 1b9513e0eb
commit c65a736714

View File

@ -37,25 +37,28 @@ import 'antd/dist/antd.css'; // or 'antd/dist/antd.less'
### Use modularized antd
```jsx
import DatePicker from 'antd/lib/date-picker'; // just for js
```
- Use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd) (Recommended)
Or we recommend use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd) with config:
```js
// .babelrc
{
"plugins": [["antd", { style: "css" }]]
}
```
```js
// .babelrc
{
"plugins": [["antd", { style: "css" }]]
}
```
Then you can import components from antd directly.
Then you can import antd modularly and simply:
```jsx
// import js and css modularly, parsed by babel-plugin-antd
import { DatePicker } from 'antd';
```
- Manually import
```jsx
import DatePicker from 'antd/lib/date-picker'; // just for js
```
```jsx
// import js and css modularly
import { DatePicker } from 'antd';
```
## Browser Support