File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,29 @@ 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
+
19
42
## IOS
20
43
21
44
** Add Swift**
You can’t perform that action at this time.
0 commit comments