v1.3.0
Documentation v1.3.0: https://raw.githack.com/uiwjs/react-signature/bab8ae4/index.html
Comparing Changes: v1.2.3...v1.3.0
- π website: update example. 06fb363 @jaywcjlove
- π feat: Enhance the
renderPath
props. 7dbee61 @jaywcjlove - π feat: add
canvas
component. 1ab8c6e @jaywcjlove
Canvas
Experimental components
import Signature from '@uiw/react-signature/canvas';
import React, { useRef } from "react";
import Signature from '@uiw/react-signature/canvas';
export default function App() {
const $canvas = useRef(null);
const handle = (evn) => $canvas.current?.clear();
return (
<Signature ref={$canvas} width="450" height="230" />
);
}
Enhance the renderPath
props
export interface SignatureProps extends React.SVGProps<SVGSVGElement> {
prefixCls?: string;
options?: StrokeOptions;
readonly?: boolean;
defaultPoints?: Record<string, number[][]>;
- renderPath?: (d: string, keyName: string, point: number[][], index: number) => JSX.Element;
+ renderPath?: (d: string, keyName: string, point: number[][], index: number, container: SVGSVGElement) => JSX.Element;
onPointer?: (points: number[][]) => void;
}