Skip to content

Commit b91651e

Browse files
committed
feat: update rm
1 parent b9478ff commit b91651e

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

README.md

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,6 @@ web: svg
1616

1717
`yarn add react-native-clippathview`
1818

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-
4219
## IOS
4320

4421
**Add Swift**
@@ -72,6 +49,28 @@ import {ClipPathView , ClipPathViewH } from 'react-native-clippathview'
7249
</ClipPathView>
7350

7451
```
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+
```
7574

7675
## Props
7776

0 commit comments

Comments
 (0)