Skip to content

Commit

Permalink
docs: about link (ant-design#1255)
Browse files Browse the repository at this point in the history
  • Loading branch information
txp1035 authored Dec 14, 2022
1 parent 55a4a35 commit 8bd8750
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 11 deletions.
21 changes: 16 additions & 5 deletions docs/react/introduce.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,24 @@ $ npm install @ant-design/react-native --save
or

```bash
yarn add @ant-design/react-native
$ yarn add @ant-design/react-native
```

### Link icon fonts


```bash
$ npm install @ant-design/icons-react-native --save
```

or

```bash
react-native link @ant-design/icons-react-native
$ yarn add @ant-design/icons-react-native
```

```bash
$ npx react-native link @ant-design/icons-react-native
```

> If you are using expo please make sure fonts has been loaded
Expand Down Expand Up @@ -118,12 +129,12 @@ class App extends React.Component {
}
}
```
This is not the way you would write it if you were using expo sdk32 or above
```jsx
This is not the way you would write it if you were using expo sdk32 or above
```jsx
import { Font } from 'expo';
```
Instead, use a separate name
```jsx
```jsx
import * as Font from 'expo-font';
```

Expand Down
23 changes: 17 additions & 6 deletions docs/react/introduce.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,30 @@ title: Ant Design Mobile RN of React
### 2. 安装

```bash
npm install @ant-design/react-native --save
$ npm install @ant-design/react-native --save
```

or

```bash
yarn add @ant-design/react-native
$ yarn add @ant-design/react-native
```

### 链接字体图标


```bash
$ npm install @ant-design/icons-react-native --save
```

or

```bash
react-native link @ant-design/icons-react-native
$ yarn add @ant-design/icons-react-native
```

```bash
$ npx react-native link @ant-design/icons-react-native
```

> 如果你用的是 expo 请确保字体已经加载完成再初始化 app
Expand Down Expand Up @@ -119,12 +130,12 @@ class App extends React.Component {
}
```
当你使用expo sdk32以上版本时已经弃用了下面这种写法
```jsx

```jsx
import { Font } from 'expo';
```
转而使用单独命名的
```jsx
```jsx
import * as Font from 'expo-font';
```
### 3. 使用
Expand Down

0 comments on commit 8bd8750

Please sign in to comment.