import React from 'react'; import { RBACWrapper } from './RBACWrapper'; import { RBACComponentProps } from './RBAC.types'; export function withRBAC< T extends object, R extends string = string, P extends string = string >( WrappedComponent: React.ComponentType, rbacProps: Omit, 'children'> ) { const ComponentWithRBAC = (props: T) => { return ( {...rbacProps}> ); }; return ComponentWithRBAC; }