0.1.12 • Published 2 years ago

react-native-signature-capture-fabric v0.1.12

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-native-signature-capture-fabric

capture signature for react native

Installation

npm install react-native-signature-capture-fabric

Usage

import { SignatureCaptureComponent } from 'react-native-signature-capture-fabric';

// ...

export default function App() {
  const signatureCaptureComponentRef =
    React.useRef<SignatureCaptureComponent>(null);
  return (
    <ScrollView style={styles.container} centerContent>
      <SignatureCaptureComponent
        ref={signatureCaptureComponentRef}
        backgroundColor="#ffffff"
        signatureFontSize={10}
        strokeColor="#362233"
        style={styles.box}
        onSaveEvent={(saveEventResult) => {
          console.log(
            'result dataImage',
            saveEventResult.nativeEvent.dataImage
          );
          console.log(
            'result imagePath',
            saveEventResult.nativeEvent.imagePath
          );
        }}
      />
      <TouchableOpacity
        style={styles.button}
        onPress={() => {
          signatureCaptureComponentRef.current?.save();
        }}
      >
        <Text>Save</Text>
      </TouchableOpacity>
      <TouchableOpacity
        style={styles.button}
        onPress={() => {
          signatureCaptureComponentRef.current?.reset();
        }}
      >
        <Text>Reset</Text>
      </TouchableOpacity>
    </ScrollView>
  );
}

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

0.1.12

2 years ago

0.1.11

2 years ago

0.1.10

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.6

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago