mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
sort roles and fix empty name styling
This commit is contained in:
parent
de37215850
commit
309b02c6f6
2 changed files with 4 additions and 2 deletions
|
@ -64,6 +64,8 @@ export default class Role extends React.Component<RoleProps, RoleState> {
|
|||
base: Color(color).hsl().string()
|
||||
}
|
||||
|
||||
const name = (this.props.role.name !== '') ? this.props.role.name : <> </>
|
||||
|
||||
return <RoleStyled
|
||||
active={this.props.active}
|
||||
disabled={this.props.disabled}
|
||||
|
@ -73,7 +75,7 @@ export default class Role extends React.Component<RoleProps, RoleState> {
|
|||
colors={roleColors}
|
||||
title={(this.props.disabled) ? 'This role has unsafe permissions.' : null}
|
||||
>
|
||||
{this.props.role.name}
|
||||
{name}
|
||||
{ (this.props.disabled && this.state.hovering) && <Tooltip>This role has unsafe permissions.</Tooltip> }
|
||||
</RoleStyled>
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue