@noripi10/expo-pencilkit
Version:
Apple Pencilkit
25 lines • 861 B
JavaScript
import * as React from 'react';
import { requireNativeViewManager } from 'expo-modules-core';
const NativeViewManager = requireNativeViewManager('ExpoPencilkit');
export const ExpoPencilkit = React.forwardRef((props, ref) => {
const nativeRef = React.useRef(null);
React.useImperativeHandle(ref, () => ({
clearDraw: async (props) => {
if (nativeRef.current) {
await nativeRef.current.clearDraw(props);
}
},
undo: async () => {
if (nativeRef.current) {
await nativeRef.current.undo();
}
},
redo: async () => {
if (nativeRef.current) {
await nativeRef.current.redo();
}
},
}));
return <NativeViewManager {...props} ref={nativeRef}/>;
});
//# sourceMappingURL=ExpoPencilkit.js.map