Skip to content

Function: HasRole() ​

ts
function HasRole(props): Element;

Defined in: packages/solid/src/components.ts:84

Renders children if the user has the role(s), like spatie's @role / @hasanyrole / @hasallroles.

Parameters ​

ParameterType
propsHasRoleProps

Returns ​

Element

Released under the MIT License. Inspired by spatie/laravel-permission.