Skip to content

Commit

Permalink
fix: delegator card profile styles (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
andyesp authored Oct 23, 2023
1 parent e5ffa64 commit f81b620
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/components/Common/Username.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: flex;
flex-direction: row;
align-items: center;
gap: 0.5rem;
}

.Username--address {
Expand All @@ -23,7 +24,6 @@ a.Username span.address {

.Username .dcl.address,
.Username .Username__Name {
margin-left: 0.5rem;
text-overflow: ellipsis;
overflow: hidden;
}
Expand Down
18 changes: 5 additions & 13 deletions src/components/Delegation/DelegatorCardProfile.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
padding-right: 20px;
font-weight: var(--weight-semi-bold);
font-size: 15px;
line-height: 28px;
letter-spacing: 0.4px;
text-overflow: ellipsis;
white-space: nowrap;
Expand All @@ -32,23 +31,16 @@

.DelegatorCardProfile__Details {
display: flex;
flex-direction: row;
flex-direction: column;
}

.DelegatorCardProfile__DelegatedVp {
color: var(--black-600);
text-transform: uppercase;
align-items: center;
font-weight: var(--weight-normal);
font-size: 11px;
line-height: 26px;
}

.DelegatorCardProfile__DetailsItem:after {
content: '·';
padding: 0 5px;
}

.DelegatorCardProfile__DetailsItem:last-child:after {
content: '';
padding: 0;
line-height: 16px;
}

.DelegatorCardProfile__Avatar {
Expand Down
10 changes: 4 additions & 6 deletions src/components/Delegation/DelegatorCardProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ function DelegatorCardProfile({ address, vp }: Props) {
return (
<Link className="DelegatorCardProfile" href={locations.profile({ address })}>
<div className="DelegatorCardProfile__Section">
<Username className="DelegatorCardProfile__Avatar" address={address} variant="avatar" size="medium" />
<div>
<Username className="DelegatorCardProfile__Avatar" address={address} variant="avatar" size="small" />
<div className="DelegatorCardProfile__Details">
<Username className="DelegatorCardProfile__Title" variant="address" address={address} />
<span className="DelegatorCardProfile__Details">
<span className="DelegatorCardProfile__DetailsItem">
{t('page.profile.delegators.delegated', { vp: intl.formatNumber(vp) })}
</span>
<span className="DelegatorCardProfile__DelegatedVp">
{t('page.profile.delegators.delegated', { vp: intl.formatNumber(vp) })}
</span>
</div>
</div>
Expand Down

0 comments on commit f81b620

Please sign in to comment.