0.2.0 • Published 9 years ago
react-native-scrawl v0.2.0
react-native-scrawl
create scrawl with react-native-svg
Install
# react-native-svg
npm install --save react-native-svg
react-native link react-native-svg
# install react-raphael-scrawl in your react-raphael-scrawl projectnpm install --save react-native-scrawl
Quickly Start
import React, { Component } from 'react';
import {
AppRegistry,
View
} from 'react-native';
import Scrawl from 'react-native-scrawl'
export default class ScrawlApp extends Component {
render() {
return (
<View>
<Scrawl ref="scrawl" />
</View>
);
}
}
AppRegistry.registerComponent('scrawl', () => ScrawlApp);API
All Scrawl Props
- width
numberwidth of the canvas - height
numberheight of the canvas - attr
objectattr of the scrawl path, you can see https://github.com/react-native-community/react-native-svg#common-props
All Scrawl Ref
- clear
functionclear all scrawl path
Development
npm install
react-native link react-native-svg
react-native run-android
react-native run-iosContact
Email: liuhong1.happy@163.com