From ee3bd96f2d1f330bfd4b1b5585d5a6d014457813 Mon Sep 17 00:00:00 2001 From: Chuns Chen Date: Fri, 18 Nov 2022 14:23:50 +0800 Subject: [PATCH] docs: remove dist/antd.css (#38672) --- docs/react/getting-started.en-US.md | 2 +- docs/react/getting-started.zh-CN.md | 2 +- docs/react/use-in-typescript.en-US.md | 7 +------ docs/react/use-in-typescript.zh-CN.md | 7 +------ docs/react/use-with-create-react-app.en-US.md | 7 +------ docs/react/use-with-create-react-app.zh-CN.md | 7 +------ 6 files changed, 6 insertions(+), 26 deletions(-) diff --git a/docs/react/getting-started.en-US.md b/docs/react/getting-started.en-US.md index 30a3a94595..3c59b220c9 100755 --- a/docs/react/getting-started.en-US.md +++ b/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 = () => { diff --git a/docs/react/getting-started.zh-CN.md b/docs/react/getting-started.zh-CN.md index ee26fb6af5..29cd23fcfd 100755 --- a/docs/react/getting-started.zh-CN.md +++ b/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'); diff --git a/docs/react/use-in-typescript.en-US.md b/docs/react/use-in-typescript.en-US.md index 72c5bdfd89..496f7dbe08 100644 --- a/docs/react/use-in-typescript.en-US.md +++ b/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. diff --git a/docs/react/use-in-typescript.zh-CN.md b/docs/react/use-in-typescript.zh-CN.md index 5e1b58627c..3e25cd7824 100644 --- a/docs/react/use-in-typescript.zh-CN.md +++ b/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 书写并提供了完整的定义,你可以享受组件属性输入建议和定义检查的功能。 diff --git a/docs/react/use-with-create-react-app.en-US.md b/docs/react/use-with-create-react-app.en-US.md index c50128d6be..47d06f0cfc 100644 --- a/docs/react/use-with-create-react-app.en-US.md +++ b/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! diff --git a/docs/react/use-with-create-react-app.zh-CN.md b/docs/react/use-with-create-react-app.zh-CN.md index 5880de63f8..3b572cb180 100644 --- a/docs/react/use-with-create-react-app.zh-CN.md +++ b/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 组件成功运行起来了,开始开发你的应用吧!