From c7ef3ce630c6a6999384dfb887ec296eb9f50a62 Mon Sep 17 00:00:00 2001 From: qinlianao Date: Mon, 20 May 2024 15:53:29 +0800 Subject: [PATCH] =?UTF-8?q?[Issues:=20#I9QOE7]=20=E6=B7=BB=E5=8A=A0react-n?= =?UTF-8?q?ative-neomorph-shadows=E6=8C=87=E5=AF=BC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zh-cn/react-native-neomorph-shadows.md | 144 +++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 zh-cn/react-native-neomorph-shadows.md diff --git a/zh-cn/react-native-neomorph-shadows.md b/zh-cn/react-native-neomorph-shadows.md new file mode 100644 index 00000000..a730da65 --- /dev/null +++ b/zh-cn/react-native-neomorph-shadows.md @@ -0,0 +1,144 @@ +> 模板版本:v0.2.0 + +

+

react-native-neomorph-shadows

+

+

+ + Supported platforms + + + License + + +

+ +> [!TIP] [Github 地址](https://github.com/react-native-oh-library/react-native-neomorph-shadows) + +## 安装与使用 + +请到三方库的 Releases 发布地址查看配套的版本信息:[@react-native-oh-tpl/react-native-neomorph-shadows Releases](https://github.com/react-native-oh-library/react-native-neomorph-shadows/releases),并下载适用版本的 tgz 包。 + +进入到工程目录并输入以下命令: + +> [!TIP] # 处替换为 tgz 包的路径 + + + +#### **npm** + +```bash +npm install @react-native-oh-tpl/react-native-neomorph-shadows@file:# +``` + +#### **yarn** + +```bash +yarn add @react-native-oh-tpl/react-native-neomorph-shadows@file:# +``` + + + +下面的代码展示了这个库的基本使用场景: + +```tsx +import React from 'react'; +import { View, StyleSheet, Text } from 'react-native'; +import { Shadow } from 'react-native-neomorph-shadows'; + +export default function () { + return ( + + + + + 登录/注册 + + + + + ); +}; + +const styles = StyleSheet.create({ + container: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: '#f0f0f0', + }, +}); + + +``` + +## 约束与限制 + +### 兼容性 + +要使用此库,需要使用正确的 React-Native 和 RNOH 版本。另外,还需要使用配套的 DevEco Studio 和 手机 ROM。 + +请到三方库相应的 Releases 发布地址查看 Release 配套的版本信息:[@react-native-oh-tpl/react-native-neomorph-shadows Releases](https://github.com/react-native-oh-library/react-native-neomorph-shadows/releases) + +在下述版本验证通过: + +RNOH:0.72.20; SDK:HarmonyOS-NEXT-DB1; IDE:DevEco Studio 5.0.3.300; ROM:3.0.0.18; + +## 属性 + +### 此组件有以下属性: +## **API(TextButton )** +>[!tip] "Platform"列表示该属性在原三方库上支持的平台。 + +>[!tip] "HarmonyOS Support"列为 yes 表示 HarmonyOS 平台支持该属性;no 则表示不支持;partially 表示部分支持。使用方法跨平台一致,效果对标 iOS 或 Android 的效果。 + +| Name | Description | Type | Required | Platform | HarmonyOS Support | +|:-----------------------:| :-----------------------------------------------: | :------------------------------------------------------: | :------: | :---------: | :---------------: | +| **style** | Style object | Object | No | iOS/Android | Yes | +| **fillOpacity** | shadow transparency | String | YES | iOS/Android | Yes | +| **stopColor** | Shadow Gradient End Color | String | No | iOS/Android | Yes | +| **startColor** | Shadow Gradient Start Color | String | No | iOS/Android | Yes | + + +## 遗留问题 + +目前仅根据实际需求,设计Shadow组件阴影效果。Neomorph组件暂未涉及。 + +## 其他 + +## 开源协议 + +本项目基于 [MIT License](https://github.com/tokkozhin/react-native-neomorph-shadows/blob/master/LICENSE) ,请自由地享受和参与开源。 \ No newline at end of file -- Gitee