From b49bb2215b8b1b7c670fdbeea713073481bd77ab Mon Sep 17 00:00:00 2001 From: zogpap Date: Mon, 8 Jul 2024 19:16:29 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20[Issues:=20#IABGMU]=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0react-native-modals=E6=8C=87=E5=AF=BC=E6=96=87?= =?UTF-8?q?=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-modals.md | 243 +++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 zh-cn/react-native-modals.md diff --git a/zh-cn/react-native-modals.md b/zh-cn/react-native-modals.md new file mode 100644 index 00000000..d9b3dd6b --- /dev/null +++ b/zh-cn/react-native-modals.md @@ -0,0 +1,243 @@ + +模板版本:v0.2.2 + +

+

react-native-modals

+

+ +

+ + Supported platforms + + + License + +

+ + +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-modals) + + +## 安装与使用 + +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-modals Releases](https://github.com/react-native-oh-library/react-native-modals/releases),并下载适用版本的 tgz 包。 + +进入到工程目录并输入以下命令: + +> [!TIP] # 处替换为 tgz 包的路径 + + + +#### **npm** + +```bash +npm install @react-native-oh-tpl/react-native-modals@file:# +``` + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-modals@file:# +``` + + + +下面的代码展示了这个库的基本使用场景: + +> [!WARNING] 使用时 import 的库名不变。 + +```js + +import { ModalPortal } from 'react-native-modals'; +import { Provider } from 'react-redux'; + +const Root = () => { + return ( + + + + + ); +} + +``` + + +```js +import React, { useState } from 'react' +import { Modal, ModalContent } from 'react-native-modals'; +import { Button } from 'react-native' + +export default () => { + + return ( + <> + +