Last active
June 16, 2020 09:14
-
-
Save chrisjensen/8ed3562c60bffd4dba7324a9baf981b9 to your computer and use it in GitHub Desktop.
Display costume tile
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
const { SlimContent } = RaiselyComponents.Loading; | |
const { ProfileImage, ProgressBar } = RaiselyComponents.Atoms; | |
return ( | |
<React.Fragment> | |
{props.header} | |
<div className={`profile-tile profile-tile--detail-${detail}`}> | |
<ProfileImage | |
defaultImage={defaultImage} | |
profile={profile} | |
/> | |
<div className="profile-tile__content"> | |
{props.showAsLoading && ( | |
<SlimContent | |
longer | |
style={{ height: '2.8rem', width: '100%' }} | |
/> | |
)} | |
{!props.showAsLoading && ( | |
<React.Fragment> | |
<p className="profile-tile__name">{profile.name}</p> | |
<span className="profile-tile__total"> | |
{total} | |
</span> | |
<ProgressBar | |
profile={profile} | |
displaySource="custom" | |
total={total} | |
goal={goal} | |
showTotal={false} | |
showGoal={false} | |
size="small" | |
style="rounded" | |
/> | |
<div className="profile-tile__rank"> | |
{profile.rank} | |
</div> | |
</React.Fragment> | |
)} | |
</div> | |
</div> | |
</React.Fragment> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment