@@ -16,29 +16,6 @@ web: svg
16
16
17
17
` yarn add react-native-clippathview `
18
18
19
- ## Harmony
20
-
21
- ``` js
22
- import { View , Text , ScrollView } from ' react-native'
23
- import React from ' react'
24
- import ClipPath from ' @react-native-oh-tpl/clip-path'
25
-
26
- export default function index () {
27
- const viewBox = [0 , 0 , 400 , 400 ]
28
- const path = ' M 200 0 L 280 100 L 400 160 L 330 270 L 320 400 L 200 350 L 80 400 L 80 270 L 0 160 L 120 100 Z'
29
-
30
- return (
31
- < ScrollView style= {{ width: ' 100%' , height: ' 100%' }}>
32
- < ClipPath viewBox= {viewBox} d= {path} style= {{ width: 200 , height: 100 , backgroundColor: ' #ff0' }}>
33
- < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
34
- < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
35
- < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
36
- < / ClipPath>
37
- < / ScrollView>
38
- )
39
- }
40
- ```
41
-
42
19
## IOS
43
20
44
21
** Add Swift**
@@ -72,6 +49,28 @@ import {ClipPathView , ClipPathViewH } from 'react-native-clippathview'
72
49
< / ClipPathView>
73
50
74
51
```
52
+ ## Harmony
53
+
54
+ ``` js
55
+ import { View , Text , ScrollView } from ' react-native'
56
+ import React from ' react'
57
+ import { ClipPathView } from ' react-native-clippathview'
58
+
59
+ export default function index () {
60
+ const viewBox = [0 , 0 , 400 , 400 ]
61
+ const path = ' M 200 0 L 280 100 L 400 160 L 330 270 L 320 400 L 200 350 L 80 400 L 80 270 L 0 160 L 120 100 Z'
62
+
63
+ return (
64
+ < ScrollView style= {{ width: ' 100%' , height: ' 100%' }}>
65
+ < ClipPath d= {path} style= {{ backgroundColor: ' #ff0' }}>
66
+ < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
67
+ < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
68
+ < Text style= {{ lineHeight: 5 , fontSize: 6 }}> children< / Text >
69
+ < / ClipPath>
70
+ < / ScrollView>
71
+ )
72
+ }
73
+ ```
75
74
76
75
## Props
77
76
0 commit comments