UNPKG

react-permissions-dynamic

Version:
12 lines (11 loc) 507 B
import React from 'react'; import type { AllowedLogicType } from '../types'; export declare type PermissionCheckProps<T extends string = string> = { action: T | T[]; children: React.ReactNode; fallback?: React.ReactNode; loading?: React.ReactNode; isAllowed?: AllowedLogicType; onDenied?: (action: T) => void; }; export declare const PermissionCheck: <T extends string = string>({ children, action, onDenied, loading, fallback, isAllowed, }: PermissionCheckProps<T>) => JSX.Element;