Skip to content

Commit

Permalink
Remove card buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
rithvikvibhu committed Jun 12, 2021
1 parent 52c1f13 commit 596ed88
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 32 deletions.
22 changes: 2 additions & 20 deletions app/pages/Account/account.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,10 @@

&__card {
margin-left: 0.6rem;
padding: 0.7rem;
padding: 0.5rem 0.9rem 1rem;
flex-shrink: 0;
border-radius: 0.25rem;
cursor: pointer;

&--red {
background-color: #ffdcdc;
Expand All @@ -249,25 +250,6 @@
border: solid 1px #84ff93;
}

button {
padding: 1px 0;
font-size: 0.65rem;
line-height: 1rem;
font-weight: 900;
color: $black;
background-color: transparent;
border: none;
border-radius: 0.125rem;

// Clickable buttons
&:not(:disabled) {
padding: 1px 6px;
color: $white;
background-color: $black;
cursor: pointer;
}
}

.title {
margin: 0;
font-size: 1rem;
Expand Down
17 changes: 5 additions & 12 deletions app/pages/Account/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ export default class Account extends Component {
for the bids to count
</Fragment>
}
buttonText="REVEAL ALL"
buttonAction={() => this.onCardButtonClick("reveal")}
/>
) : (
Expand All @@ -309,7 +308,6 @@ export default class Account extends Component {
or lose the {pluralize(renewable.domains.length, "domain")}
</Fragment>
}
buttonText="RENEW ALL"
buttonAction={() =>
this.onCardButtonClick("renew", renewable.domains)
}
Expand All @@ -334,7 +332,6 @@ export default class Account extends Component {
<strong>{redeemable.HNS / 1e6} HNS</strong>
</Fragment>
}
buttonText="REDEEM ALL"
buttonAction={() => this.onCardButtonClick("redeem")}
/>
) : (
Expand All @@ -357,7 +354,6 @@ export default class Account extends Component {
<strong>{registerable.HNS / 1e6} HNS</strong>
</Fragment>
}
buttonText="REGISTER ALL"
buttonAction={() => this.onCardButtonClick("register")}
/>
) : (
Expand All @@ -380,7 +376,6 @@ export default class Account extends Component {
{pluralize(finalizable.domains.length, "transfer")}
</Fragment>
}
buttonText="FINALIZE ALL"
buttonAction={() =>
this.onCardButtonClick("finalize", finalizable.domains)
}
Expand All @@ -407,7 +402,6 @@ export default class Account extends Component {
</strong>
</Fragment>
}
buttonText="PENDING TRANSFER"
/>
) : (
""
Expand Down Expand Up @@ -435,18 +429,17 @@ class ActionCard extends Component {
color: PropTypes.string.isRequired,
text: PropTypes.object.isRequired,
subtext: PropTypes.object.isRequired,
buttonText: PropTypes.string.isRequired,
buttonAction: PropTypes.func,
};

render() {
const { color, text, subtext, buttonText, buttonAction } = this.props;
const { color, text, subtext, buttonAction } = this.props;

return (
<div className={c("cards__card", `cards__card--${color}`)}>
<button disabled={!buttonAction} onClick={buttonAction || undefined}>
{buttonText}
</button>
<div
className={c("cards__card", `cards__card--${color}`)}
onClick={buttonAction || undefined}
>
<p className="title">{text}</p>
<p className="subtitle">{subtext}</p>
</div>
Expand Down

0 comments on commit 596ed88

Please sign in to comment.