mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 20:49:53 +08:00
update readme
This commit is contained in:
parent
d40fd90176
commit
12a7c32643
22
README.md
22
README.md
@ -22,6 +22,8 @@ npm install antd
|
||||
|
||||
## Usage example
|
||||
|
||||
### Use prebuilt bundle
|
||||
|
||||
```jsx
|
||||
import { DatePicker } from 'antd';
|
||||
ReactDOM.render(<DatePicker />, mountNode);
|
||||
@ -30,11 +32,27 @@ ReactDOM.render(<DatePicker />, mountNode);
|
||||
Import style:
|
||||
|
||||
```jsx
|
||||
import 'antd/lib/index.css'; // or 'antd/style/index.less'
|
||||
import 'antd/dist/antd.css'; // or 'antd/style/index.less'
|
||||
```
|
||||
|
||||
Use components on demand by writing as `import DatePicker from 'antd/lib/date-picker'` or use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd).
|
||||
### Use modularized antd
|
||||
|
||||
use [babel-plugin-antd](https://github.com/ant-design/babel-plugin-antd).
|
||||
|
||||
babel plugin config:
|
||||
|
||||
```
|
||||
['antd', {
|
||||
style: 'css'
|
||||
}]
|
||||
```
|
||||
|
||||
```jsx
|
||||
import { DatePicker } from 'antd';
|
||||
ReactDOM.render(<DatePicker />, mountNode);
|
||||
```
|
||||
|
||||
No need to import style manually.
|
||||
|
||||
## Browser Support
|
||||
|
||||
|
@ -123,7 +123,7 @@
|
||||
"eslint-fix": "eslint --fix components test site scripts ./*.js --ext '.js,.jsx' && eslint-tinker ./components/*/demo/*.md",
|
||||
"test": "npm run lint && npm run dist && npm run jest",
|
||||
"jest": "jest",
|
||||
"prepub":"node ./scripts/prepub",
|
||||
"pre-pub":"node ./scripts/prepub",
|
||||
"pub": "antd-tools run pub",
|
||||
"beta": "antd-tools run beta",
|
||||
"authors": "git log --format='%aN <%aE>' | sort -u | grep -v 'users.noreply.github.com' | grep -v 'alibaba-inc.com' | grep -v 'alipay.com' | grep -v 'taobao.com' > AUTHORS.txt"
|
||||
|
Loading…
Reference in New Issue
Block a user