Browse Source

docs: remove dist/antd.css (#38672)

pull/38677/head
Chuns Chen 2 years ago
committed by GitHub
parent
commit
ee3bd96f2d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs/react/getting-started.en-US.md
  2. 2
      docs/react/getting-started.zh-CN.md
  3. 7
      docs/react/use-in-typescript.en-US.md
  4. 7
      docs/react/use-in-typescript.zh-CN.md
  5. 7
      docs/react/use-with-create-react-app.en-US.md
  6. 7
      docs/react/use-with-create-react-app.zh-CN.md

2
docs/react/getting-started.en-US.md

@ -39,7 +39,7 @@ If you have already set things up by following the [Install and Initialization](
import React, { useState } from 'react';
import { render } from 'react-dom';
import { DatePicker, message } from 'antd';
import 'antd/dist/antd.css';
import 'antd/dist/reset.css';
import './index.css';
const App = () => {

2
docs/react/getting-started.zh-CN.md

@ -37,7 +37,7 @@ import { ConfigProvider, DatePicker, message } from 'antd';
import dayjs from 'dayjs';
import 'dayjs/locale/zh-cn';
import zhCN from 'antd/locale/zh_CN';
import 'antd/dist/antd.css';
import 'antd/dist/reset.css';
import './index.css';
dayjs.locale('zh-cn');

7
docs/react/use-in-typescript.en-US.md

@ -45,6 +45,7 @@ Modify `src/App.tsx`, import Button component from `antd`.
```tsx
import React, { FC } from 'react';
import { Button } from 'antd';
import 'antd/dist/reset.css';
import './App.css';
const App: FC = () => (
@ -56,12 +57,6 @@ const App: FC = () => (
export default App;
```
Add `antd/dist/antd.css` at the top of `src/App.css`.
```css
@import '~antd/dist/antd.css';
```
OK, reboot with `yarn start`, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at it's [User Guide](https://create-react-app.dev/docs/getting-started#creating-a-typescript-app).
`antd` is written in TypeScript with complete definitions, try out and enjoy the property suggestion and typing check.

7
docs/react/use-in-typescript.zh-CN.md

@ -45,6 +45,7 @@ $ yarn add antd
```tsx
import React, { FC } from 'react';
import { Button } from 'antd';
import 'antd/dist/reset.css';
import './App.css';
const App: FC = () => (
@ -56,12 +57,6 @@ const App: FC = () => (
export default App;
```
修改 `src/App.css`,在文件顶部引入 antd 的样式。
```css
@import '~antd/dist/antd.css';
```
重新启动 `yarn start`,现在你应该能看到页面上已经有了 antd 的蓝色按钮组件,接下来就可以继续选用其他组件开发应用了。其他开发流程你可以参考 create-react-app 的[官方文档](https://create-react-app.dev/docs/getting-started#creating-a-typescript-app)。
`antd` 使用 TypeScript 书写并提供了完整的定义,你可以享受组件属性输入建议和定义检查的功能。

7
docs/react/use-with-create-react-app.en-US.md

@ -61,6 +61,7 @@ Modify `src/App.js`, import Button component from `antd`.
```jsx
import React from 'react';
import { Button } from 'antd';
import 'antd/dist/reset.css';
import './App.css';
const App = () => (
@ -72,12 +73,6 @@ const App = () => (
export default App;
```
Add `antd/dist/antd.css` at the top of `src/App.css`.
```css
@import '~antd/dist/antd.css';
```
OK, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at its [User Guide](https://create-react-app.dev/docs/getting-started).
We are successfully running antd components now, go build your own application!

7
docs/react/use-with-create-react-app.zh-CN.md

@ -61,6 +61,7 @@ $ yarn add antd
```jsx
import React from 'react';
import { Button } from 'antd';
import 'antd/dist/reset.css';
import './App.css';
const App = () => (
@ -72,12 +73,6 @@ const App = () => (
export default App;
```
修改 `src/App.css`,在文件顶部引入 `antd/dist/antd.css`
```css
@import '~antd/dist/antd.css';
```
好了,现在你应该能看到页面上已经有了 antd 的蓝色按钮组件,接下来就可以继续选用其他组件开发应用了。其他开发流程你可以参考 create-react-app 的[官方文档](https://create-react-app.dev/docs/getting-started)。
我们现在已经把 antd 组件成功运行起来了,开始开发你的应用吧!

Loading…
Cancel
Save