react-native-painter
Version:
Custom Painter Android WEB IOS
15 lines (12 loc) • 509 B
JavaScript
import React from 'react'
import { Platform, requireNativeComponent,StyleSheet } from "react-native";
const RectView = requireNativeComponent("RectView",null);
export default class Rect extends React.PureComponent {
render(){
const {style,...others} = this.props
return <RectView {...others}
style={Platform.OS === 'android'
? [{transform: style?.transform }]
: [{transform:style?.transform},StyleSheet.absoluteFillObject]} />
}
}