forked from blackjk3/react-signature-pad
-
-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
kind: featureNew feature or requestNew feature or requestkind: supportAsking for support with something or a specific use caseAsking for support with something or a specific use casescope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: typesRelated to type definitionsRelated to type definitions
Description
I tried creating a declaration file index.d.ts:
declare module 'react-signature-canvas'
{
import * as React from 'react';
interface ISignatureCanvasProps
{
velocityFilterWeight?: number;
minWidth?: number;
maxWidth?: number;
dotSize?: number;
penColor?: string;
backgroundColor?: string;
onEnd?: () => void;
onBegin?: () => void;
canvasProps?: any;
}
export class SignatureCanvas extends React.Component<ISignatureCanvasProps, any>
{
constructor(p: ISignatureCanvasProps, s: any);
}
namespace SignatureCanvas {}
}
And then importing via: import * as SignatureCanvas from 'react-signature-canvas';
.
But when I use the <SignatureCanvas />
in my react component I get
React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object
Any ideas?
Metadata
Metadata
Assignees
Labels
kind: featureNew feature or requestNew feature or requestkind: supportAsking for support with something or a specific use caseAsking for support with something or a specific use casescope: integrationRelated to an integration, not necessarily to core (but could influence core)Related to an integration, not necessarily to core (but could influence core)scope: typesRelated to type definitionsRelated to type definitions