UNPKG

pricing4react

Version:

A library of components that ease the integration of feature toggling driven by pricing plans into your React application's UI.

18 lines (17 loc) 603 B
import { NAryFunction } from "../../logic/model/NAryFunction"; import React from "react"; export interface GenericFeatureHookOptions { /** * If you're changing the `on` object, you should update this key so the hook updates with the new values. */ key?: string; on: { expression: NAryFunction<boolean>; on: React.ReactNode; }[]; default?: React.ReactNode; loading?: React.ReactNode; error?: React.ReactNode; } export type FeatureResponse = JSX.Element; export declare function useGenericFeature(options: GenericFeatureHookOptions): FeatureResponse;