UNPKG

z0rath-react

Version:

React component wrapper for Z0rath (Centralized Authorization System)

21 lines (16 loc) 526 B
import React, { PropsWithChildren, FC } from 'react'; declare const HasPermission: React.FC<PropsWithChildren<{ slug: string; noPermissionCallback?: (redirect: boolean) => void; }>>; declare const Z0rathProvider: FC<PropsWithChildren<{ apiKey: string; user?: string; }>>; type Z0rathContextType = { apiKey: string; user: string | null; setUser: (user: Z0rathContextType["user"]) => void; }; declare const useZ0rath: () => Z0rathContextType; export { HasPermission, Z0rathProvider, useZ0rath };