Skip to content

Instantly share code, notes, and snippets.

@umutyerebakmaz
Last active January 10, 2020 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umutyerebakmaz/e3b2588f874669e87b0c054bc844147b to your computer and use it in GitHub Desktop.
Save umutyerebakmaz/e3b2588f874669e87b0c054bc844147b to your computer and use it in GitHub Desktop.
<div class="role-badge" [ngClass]="{
'green': user.role === 'ADMIN',
'blue': user.role === 'MODERATOR',
'black': user.role === 'MEMBER'
}">{{ user.role }}</div>
.role-badge {
background-color: #000;
border-radius: 4px;
color: white;
font-size: 0.75rem;
margin-top: 5px;
font-weight: 400;
padding: 2px 5px;
display: flex;
flex-wrap: wrap;
a {
text-decoration: none;
color: #000;
}
a:hover {
text-decoration: underline;
}
.reader-links {
padding-right: 10px;
}
}
.green {
background-color: green;
}
.blue {
background-color: blue;
}
.black {
background-color: black;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment