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

This commit is contained in:
Chuns Chen 2022-11-18 14:23:50 +08:00 committed by GitHub
parent a3f43c1f24
commit ee3bd96f2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 26 deletions

View File

@ -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 = () => {

View File

@ -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');

View File

@ -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.

View File

@ -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 书写并提供了完整的定义,你可以享受组件属性输入建议和定义检查的功能。

View File

@ -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!

View File

@ -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 组件成功运行起来了,开始开发你的应用吧!