Skip to content

Latest commit

 

History

History
17 lines (12 loc) · 292 Bytes

File metadata and controls

17 lines (12 loc) · 292 Bytes

React-role-controller

Usage example

import { UserRole } from 'react-role-controller';

<UserRole roles={roles} currentRole={currentRole}>
  {children}
</UserRole>

Docs

  1. Roles - array of roles (strings),
  2. CurrentRole - role (string),
  3. Children - array of React nodes