-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a6ff6d
commit 56465c0
Showing
76 changed files
with
552 additions
and
730 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
import VectorImage from "./UserAvatar.svg?react"; | ||
|
||
const UserAvatar = ({ email, size = "sm", onClick }) => { | ||
return ( | ||
<svg | ||
width="24px" | ||
height="24px" | ||
viewBox="0 0 48 48" | ||
version="1.1" | ||
xmlns="http://www.w3.org/2000/svg" | ||
xmlns:xlink="http://www.w3.org/1999/xlink" | ||
fill="#dc8add" | ||
> | ||
<g stroke-width="0"></g> | ||
<g stroke-linecap="round" stroke-linejoin="round" stroke="#CCCCCC" stroke-width="0.4800000000000001"></g> | ||
<g> | ||
<g stroke-width="0.00048000000000000007" fill="none" fill-rule="evenodd"> | ||
<g fill="#dc8add" fill-rule="nonzero"> | ||
<path d="M35.7502,28 C38.0276853,28 39.8876578,29.7909151 39.9950978,32.0427546 L40,32.2487 L40,33 C40,36.7555 38.0583,39.5669 35.0798,41.3802 C32.1509,43.1633 28.2139,44 24,44 C19.7861,44 15.8491,43.1633 12.9202,41.3802 C10.0319285,39.6218485 8.11862909,36.9249713 8.00532378,33.3388068 L8,33 L8,32.2489 C8,29.9703471 9.79294995,28.1122272 12.0440313,28.0048972 L12.2499,28 L35.7502,28 Z M24,4 C29.5228,4 34,8.47715 34,14 C34,19.5228 29.5228,24 24,24 C18.4772,24 14,19.5228 14,14 C14,8.47715 18.4772,4 24,4 Z"></path> | ||
</g> | ||
</g> | ||
</g> | ||
</svg> | ||
); | ||
return <VectorImage />; | ||
}; | ||
|
||
export default UserAvatar; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,21 @@ | ||
const UserRoleBadge = ({ role }) => { | ||
|
||
const roles = { | ||
'administrator': 'red', | ||
'superuser': 'blue', | ||
'user': 'green', | ||
'client': 'yellow', | ||
} | ||
administrator: "red", | ||
superuser: "blue", | ||
user: "green", | ||
client: "yellow", | ||
}; | ||
|
||
const color = roles.hasOwnProperty(role) ? roles[role] : 'yellow'; | ||
const color = roles.hasOwnProperty(role) ? roles[role] : "yellow"; | ||
|
||
const styles = { | ||
color: `var(--${color},white)`, | ||
backgroundColor: `var(--${color}Dark)`, | ||
padding: `var(--paddingBox, .3rem .8rem)`, | ||
borderRadius: 'var(--borderRadius, 3px)', | ||
borderRadius: "var(--borderRadius, 3px)", | ||
border: `var(--borderWidth,2px) solid transparent`, | ||
fontSize: `var(--fontSizeXsmall)`, | ||
fontWeight: 'var(--fontBold)', | ||
} | ||
}; | ||
|
||
return <span style={styles}>{role}</span> | ||
} | ||
return <span style={styles}>{role}</span>; | ||
}; | ||
|
||
export default UserRoleBadge; |
Oops, something went wrong.