react-permissions-dynamic
Version:
This is a package with react-permissions
12 lines (11 loc) • 507 B
TypeScript
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;