Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pinwheel/react-modal

Package Overview
Dependencies
Maintainers
17
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pinwheel/react-modal - npm Package Compare versions

Comparing version 1.0.6 to 2.0.0-alpha

51

dist/index.d.ts
/// <reference types="react" />
export declare type LinkResult = {
accountId: string;
job: string;
userSelectedParameters: {
amount?: {
value: number;
unit: '%' | '$';
};
};
};
export declare type ErrorType = 'clientError' | 'systemError' | 'userActionRequired' | 'platformError' | 'invalidAccountsConfiguration' | 'invalidUserInput' | 'invalidLinkToken';
export declare type Error = {
type: ErrorType;
code: string;
message: string;
};
declare type EventPayload = {
selectedEmployerId: string;
selectedEmployerName: string;
} | {
selectedPlatformId: string;
selectedPlatformName: string;
} | {
value: number;
unit: '%' | '$';
} | LinkResult | {
accountId: string;
} | Error | {} | undefined;
interface PinwheelOpenOptions {
linkToken: string;
onSuccess?: (result: {
tokenId: string;
onLogin?: (result: {
accountId: string;
}) => void;
onExit?: (error: {
errorCode: string;
errorMsg: string;
}, result: {
tokenId: string;
}) => void;
onEvent?: (eventName: string, params: {
modalSessionId?: string;
[key: string]: any;
}) => void;
onSuccess?: (result: LinkResult) => void;
onError?: (error: Error) => void;
onExit?: (error?: Error) => void;
onEvent?: (eventName: string, payload: EventPayload) => void;
}

@@ -22,6 +44,3 @@ export declare type PinwheelModalProps = PinwheelOpenOptions & {

};
declare const PinwheelModal: ({ open, _srcUrl, ...props }: PinwheelOpenOptions & {
open?: boolean | undefined;
_srcUrl?: string | undefined;
}) => JSX.Element;
declare const PinwheelModal: ({ open, _srcUrl, ...props }: PinwheelModalProps) => JSX.Element;
export default PinwheelModal;

@@ -22,3 +22,3 @@ var React = require('react');

tag.type = 'application/javascript';
tag.src = url || 'https://cdn.getpinwheel.com/pinwheel-v1.js';
tag.src = url || 'https://cdn.getpinwheel.com/pinwheel-v2.js';
document.body.appendChild(tag);

@@ -25,0 +25,0 @@ tag.addEventListener('load', function () {

@@ -22,3 +22,3 @@ import { useState, useEffect, createElement } from 'react';

tag.type = 'application/javascript';
tag.src = url || 'https://cdn.getpinwheel.com/pinwheel-v1.js';
tag.src = url || 'https://cdn.getpinwheel.com/pinwheel-v2.js';
document.body.appendChild(tag);

@@ -25,0 +25,0 @@ tag.addEventListener('load', function () {

{
"name": "@pinwheel/react-modal",
"version": "1.0.6",
"version": "2.0.0-alpha",
"description": "React package for Pinwheel modal",

@@ -5,0 +5,0 @@ "author": "roscioli",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc