Skip to content

Commit

Permalink
Use the "color" prop instead of scss, update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
dan437 committed Jul 14, 2023
1 parent 7884cda commit 11719ef
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`ExchangeRateDisplay renders the component with initial props 1`] = `
class="exchange-rate-display"
>
<div
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center"
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--color-text-default"
data-testid="exchange-rate-display-quote-rate"
>
<span>
Expand Down
5 changes: 5 additions & 0 deletions ui/pages/swaps/exchange-rate-display/exchange-rate-display.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
DISPLAY,
AlignItems,
IconColor,
TextColor,
} from '../../../helpers/constants/design-system';
import { Icon, IconName } from '../../../components/component-library';
import { I18nContext } from '../../../contexts/i18n';
Expand Down Expand Up @@ -74,6 +75,9 @@ export default function ExchangeRateDisplay({
const quoteRateClassName = onQuotesClick
? 'exchange-rate-display__quote-rate'
: 'exchange-rate-display__quote-rate--no-link';
const quoteRateColor = onQuotesClick
? TextColor.primaryDefault
: TextColor.textDefault;

return (
<div className={classnames('exchange-rate-display', className)}>
Expand All @@ -82,6 +86,7 @@ export default function ExchangeRateDisplay({
justifyContent={JustifyContent.center}
alignItems={AlignItems.center}
onClick={onQuotesClick}
color={quoteRateColor}
className={quoteRateClassName}
data-testid="exchange-rate-display-quote-rate"
>
Expand Down
2 changes: 0 additions & 2 deletions ui/pages/swaps/exchange-rate-display/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@

&__quote-rate {
cursor: pointer;
color: var(--color-primary-default);
}

&__quote-rate--no-link {
cursor: text;
color: var(--color-text-default);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ exports[`MainQuoteSummary renders the component with initial props 4`] = `
class="exchange-rate-display main-quote-summary__exchange-rate-display"
>
<div
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center"
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--color-text-default"
data-testid="exchange-rate-display-quote-rate"
>
<span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ exports[`ViewQuote renders the component with EIP-1559 enabled 2`] = `
class="exchange-rate-display main-quote-summary__exchange-rate-display"
>
<div
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center"
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--color-text-default"
data-testid="exchange-rate-display-quote-rate"
>
<span>
Expand Down Expand Up @@ -110,7 +110,7 @@ exports[`ViewQuote renders the component with initial props 2`] = `
class="exchange-rate-display main-quote-summary__exchange-rate-display"
>
<div
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center"
class="box exchange-rate-display__quote-rate--no-link box--display-flex box--flex-direction-row box--justify-content-center box--align-items-center box--color-text-default"
data-testid="exchange-rate-display-quote-rate"
>
<span>
Expand Down

0 comments on commit 11719ef

Please sign in to comment.