diff --git a/en/react-native-modalbox.md b/en/react-native-modalbox.md index aa61da0c766e44cf2dd0b92438e39cc2edfce639..257f5d14fd91af8f93eabc8d613a01015b802d53 100644 --- a/en/react-native-modalbox.md +++ b/en/react-native-modalbox.md @@ -16,24 +16,37 @@ ## Installation and Usage -Find the matching version information in the release address of a third-party library: [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases).For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +Find the matching version information in the release address of a third-party library: -Go to the project directory and execute the following instruction: +| Version | Releases info | Support RN version | +| ----------- | ------------------------------------------------------------ | ---------- | +| 2.0.2 | [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) | 0.72 | +| 2.1.0-rc.1 | [@react-native-ohos/react-native-modalbox Releases]() | 0.77 | +For older versions that are not published to npm, please refer to the [installation guide](/en/tgz-usage-en.md) to install the tgz package. +Go to the project directory and execute the following instruction: #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-modalbox + +# 0.77 +npm install @react-native-ohos/react-native-modalbox ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-modalbox +# 0.72 +yarn add @react-native-oh-tpl/react-native-modalbox + +# 0.77 +yarn add @react-native-ohos/react-native-modalbox ``` @@ -481,7 +494,12 @@ const styles = StyleSheet.create({ To use this repository, you need to use the correct React-Native and RNOH versions. In addition, you need to use DevEco Studio and the ROM on your phone. -Check the release version information in the release address of the third-party library: [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) +Check the release version information in the release address of the third-party library: + +| Version | Releases info | Support RN version | +| ----------- | ------------------------------------------------------------ | ---------- | +| 2.0.2 | [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) | 0.72 | +| 2.1.0-rc.1 | [@react-native-ohos/react-native-modalbox Releases]() | 0.77 | ## Properties @@ -506,7 +524,7 @@ Check the release version information in the release address of the third-party | animationDuration | Duration of the animation | `number` | no | iOS/Android | yes | | easing | Easing function applied to opening modal animation | `function` | no | iOS/Android | yes | | backButtonClose | (Android only) Close modal when receiving back button event | `bool` | no | Android | no | -| startOpen | Allow modal to appear open without animation upon first mount | `bool` | no | iOS/Android | yes | +| startOpen | Automatically open Modal when allowing component mounting | `bool` | no | iOS/Android | yes | | coverScreen | Will use RN Modal component to cover the entire screen wherever the modal is mounted in the component hierarchy | `bool` | no | iOS/Android | yes | | keyboardTopOffset | This property prevent the modal to cover the ios status bar when the modal is scrolling up because the keyboard is opening | `number` | no | iOS/Android | yes | | useNativeDriver | Enables the hardware acceleration to animate the modal. Please note that enabling this can cause some flashes in a weird way when animating | `bool` | no | iOS/Android | yes | diff --git a/zh-cn/react-native-modalbox.md b/zh-cn/react-native-modalbox.md index 12c1bf47c629e58add7f93346aa04cf93bfbb4a6..6c66808f88d8c6b50254ac96f18b74933b992795 100644 --- a/zh-cn/react-native-modalbox.md +++ b/zh-cn/react-native-modalbox.md @@ -16,7 +16,14 @@ ## 安装与使用 -请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) 。对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 +请到三方库的 Releases 发布地址查看配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ----------- | ------------------------------------------------------------ | ---------- | +| 2.0.2 | [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) | 0.72 | +| 2.1.0-rc.1 | [@react-native-ohos/react-native-modalbox Releases]() | 0.77 | + +对于未发布到npm的旧版本,请参考[安装指南](/zh-cn/tgz-usage.md)安装tgz包。 进入到工程目录并输入以下命令: @@ -25,13 +32,21 @@ #### **npm** ```bash +# 0.72 npm install @react-native-oh-tpl/react-native-modalbox + +# 0.77 +npm install @react-native-ohos/react-native-modalbox ``` #### **yarn** ```bash -yarn add @react-native-oh-tpl/react-native-modalbox +# 0.72 +yarn add @react-native-oh-tpl/react-native-modalbox + +# 0.77 +yarn add @react-native-ohos/react-native-modalbox ``` @@ -479,7 +494,12 @@ const styles = StyleSheet.create({ 要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 -请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息: + +| 三方库版本 | 发布信息 | 支持RN版本 | +| ----------- | ------------------------------------------------------------ | ---------- | +| 2.0.2 | [@react-native-oh-tpl/react-native-modalbox Releases](https://github.com/react-native-oh-library/react-native-modalbox/releases) | 0.72 | +| 2.1.0-rc.1 | [@react-native-ohos/react-native-modalbox Releases]() | 0.77 | ## 属性 @@ -504,7 +524,7 @@ const styles = StyleSheet.create({ | animationDuration | Duration of the animation | `number` | no | iOS/Android | yes | | easing | Easing function applied to opening modal animation | `function` | no | iOS/Android | yes | | backButtonClose | (Android only) Close modal when receiving back button event | `bool` | no | Android | no | -| startOpen | Allow modal to appear open without animation upon first mount | `bool` | no | iOS/Android | yes | +| startOpen | Automatically open Modal when allowing component mounting | `bool` | no | iOS/Android | yes | | coverScreen | Will use RN Modal component to cover the entire screen wherever the modal is mounted in the component hierarchy | `bool` | no | iOS/Android | yes | | keyboardTopOffset | This property prevent the modal to cover the ios status bar when the modal is scrolling up because the keyboard is opening | `number` | no | iOS/Android | yes | | useNativeDriver | Enables the hardware acceleration to animate the modal. Please note that enabling this can cause some flashes in a weird way when animating | `bool` | no | iOS/Android | yes |