Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.1.2 #1340

Merged
merged 3 commits into from
Apr 15, 2024
Merged

5.1.2 #1340

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,24 +99,31 @@ yarn add @ant-design/react-native
### Installing peer dependencies

```bash
npm install @react-native-community/segmented-control @react-native-community/slider
npm install @react-native-community/segmented-control @react-native-community/slider @ant-design/icons-react-native react-native-gesture-handler
```

or

```bash
yarn add @react-native-community/segmented-control @react-native-community/slider
yarn add @react-native-community/segmented-control @react-native-community/slider @ant-design/icons-react-native react-native-gesture-handler
```

> You need go to ios folder and run `pod install` (auto linking),Android will handle it by itself.

### Link icon fonts

```js
// config `react-native.config.js` in project’s root directory
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
```
then
```bash
npx react-native link
npx react-native-asset
```

[introduce](docs/react/introduce.en-US.md#安装)
[introduce](docs/react/introduce.en-US.md#2-installation)

## Links

Expand Down
16 changes: 12 additions & 4 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,22 @@ yarn add @react-native-community/segmented-control @react-native-community/slide

> 安装完依赖后需要到 iOS 目录 `pod install`(auto linking),Android 不需要手动处理

### 链接字体图标以及自动链接
### 链接字体图标


```js
// 配置根目录下的 `react-native.config.js` 文件
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
```
然后
```bash
# 手动链接字体图标
npx react-native link
# 手动执行命令
npx react-native-asset
```

[介绍](docs/react/introduce.zh-CN.md#安装)
[介绍](docs/react/introduce.zh-CN.md#2-安装)

## 链接

Expand Down
14 changes: 13 additions & 1 deletion docs/react/introduce.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,21 @@ or
$ yarn add @ant-design/icons-react-native
```

<br/>
Add assets to your `react-native.config.js` ( If not exist, please create in project’s root directory )

```js
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
```

Run the [`react-native-asset`](https://github.com/unimonkiez/react-native-asset)'s command and linking + unlinking is automatic

```bash
$ npx react-native link @ant-design/icons-react-native
npx react-native-asset
```
<br/>

> If you are using expo please make sure fonts has been loaded

Expand Down
15 changes: 14 additions & 1 deletion docs/react/introduce.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,22 @@ or
$ yarn add @ant-design/icons-react-native
```

<br/>

将字体资源路径配置到根目录下的 `react-native.config.js` 文件中 ( 如果没有,请创建 )

```js
module.exports = {
assets: ['node_modules/@ant-design/icons-react-native/fonts'],
};
```

然后执行[`react-native-asset`](https://github.com/unimonkiez/react-native-asset)的命令

```bash
$ npx react-native link @ant-design/icons-react-native
npx react-native-asset
```
<br/>

> 如果你用的是 expo 请确保字体已经加载完成再初始化 app

Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ant-design/react-native",
"version": "5.1.1",
"version": "5.1.2",
"description": "基于蚂蚁金服移动设计规范的 React Native 组件库",
"keywords": [
"ant",
Expand All @@ -24,14 +24,12 @@
},
"files": [
"lib",
"es",
"react-native.config.js"
"es"
],
"license": "MIT",
"main": "lib/index.js",
"module": "es/index.js",
"dependencies": {
"@ant-design/icons-react-native": "^2.3.1",
"@bang88/react-native-ultimate-listview": "^4.1.0",
"@types/shallowequal": "^1.1.1",
"babel-runtime": "^6.x",
Expand All @@ -42,7 +40,6 @@
"rc-util": "^4.21.1",
"react-native-codegen": "^0.0.7",
"react-native-collapsible": "^1.6.0",
"react-native-gesture-handler": "~2.2.1",
"react-native-modal-popover": "^2.0.1",
"shallowequal": "^1.1.0",
"utility-types": "^3.10.0"
Expand Down Expand Up @@ -99,10 +96,12 @@
"typescript": "^4.3.2"
},
"peerDependencies": {
"@ant-design/icons-react-native": ">= 2.3.1",
"@react-native-community/segmented-control": ">= 1.4.0",
"@react-native-community/slider": ">= 2.0.0",
"react": ">=17.0.1",
"react-native": ">=0.64.1"
"react-native": ">=0.64.1",
"react-native-gesture-handler": ">=2.2.1"
},
"scripts": {
"lint": "npm run tslint && npm run srclint && npm run applint",
Expand Down