@j2inn/app-react
Version:
React implementation of the j2inn-app framework
27 lines (26 loc) • 751 B
TypeScript
import { AppAccessLevel } from '@j2inn/app';
import React from 'react';
/**
* The application access checker properties.
*/
export interface AppAccessCheckerProps {
app: string;
access: AppAccessLevel;
children?: React.ReactNode;
}
/**
* A high-order level component that performs app access level checks before
* rendering any children.
*
* ```
* <AppAccessChecker app='myAppId' access='read'>
* <div>
* This content will only render if the user has read access permissions
* for the `myAppId` application.
* </div>
* </AppAccessChecker>
* ```
*/
export declare const AppAccessChecker: (({ app, access, children }: AppAccessCheckerProps) => JSX.Element) & {
displayName: string;
};