Skip to content

Commit 1a09b51

Browse files
authored
Merge pull request #1 from react-native-oh-library/codegen
Codegen
2 parents 8f9269a + b9478ff commit 1a09b51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1761
-5203
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,29 @@ 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+
1942
## IOS
2043

2144
**Add Swift**

android/README.md

Lines changed: 0 additions & 14 deletions
This file was deleted.

android/build.gradle

Lines changed: 0 additions & 148 deletions
This file was deleted.

android/src/main/AndroidManifest.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

android/src/main/java/com/jjlf/rnclippath/ClipPathProps.java

Lines changed: 0 additions & 135 deletions
This file was deleted.

android/src/main/java/com/jjlf/rnclippath/ClipPathTransform.java

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)