@microbitsclub/paywall-solid
Version:
Solid components for Microbits paywalls
23 lines (22 loc) • 722 B
TypeScript
import { MicrobitsClient } from '@microbitsclub/microbits-client';
import { JSX } from 'solid-js/jsx-runtime';
interface PopoverPaywallState {
microbits?: MicrobitsClient;
currentPaywall?: CurrentPaywall;
}
interface CurrentPaywall {
id: string;
price: number;
contentUrl: string;
}
export declare const usePopoverPaywall: () => readonly [PopoverPaywallState, {
selectPaywallByContentUrl(contentUrl: string): void;
closePaywall(): void;
confirmPaywallPurchase(): void;
}];
export interface PopoverPaywallProviderProps {
microbits: MicrobitsClient;
children: JSX.Element;
}
export declare const PopoverPaywallProvider: (props: PopoverPaywallProviderProps) => JSX.Element;
export {};