From f463af5556433139bf133c78f963be80cf658dbe Mon Sep 17 00:00:00 2001 From: ryanml Date: Wed, 27 Mar 2019 05:08:25 -0700 Subject: [PATCH] Fixing panel console error --- .../rewards/rewardsButton/__snapshots__/spec.tsx.snap | 1 - src/features/rewards/rewardsButton/index.tsx | 2 +- src/features/rewards/rewardsButton/style.ts | 4 ++-- src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap | 1 - .../rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap | 1 - src/features/rewards/welcomePage/__snapshots__/spec.tsx.snap | 2 -- 6 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap b/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap index 7b0d8b5e0..35a24ca19 100644 --- a/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap +++ b/src/features/rewards/rewardsButton/__snapshots__/spec.tsx.snap @@ -35,7 +35,6 @@ exports[`TipButton tests basic tests matches the snapshot 1`] = ` > `; diff --git a/src/features/rewards/rewardsButton/index.tsx b/src/features/rewards/rewardsButton/index.tsx index 78830eb75..5a7850de0 100644 --- a/src/features/rewards/rewardsButton/index.tsx +++ b/src/features/rewards/rewardsButton/index.tsx @@ -32,7 +32,7 @@ export default class RewardsButton extends React.PureComponent { onClick={onClick} data-test-id={testId} > - + {text} { icon diff --git a/src/features/rewards/rewardsButton/style.ts b/src/features/rewards/rewardsButton/style.ts index 23aa640e5..f9230a35b 100644 --- a/src/features/rewards/rewardsButton/style.ts +++ b/src/features/rewards/rewardsButton/style.ts @@ -8,7 +8,7 @@ import styled, { css } from 'styled-components' interface StyleProps { type?: Type - icon?: boolean + hasIcon?: boolean disabled?: boolean } @@ -78,7 +78,7 @@ export const StyledButtonText = styled('span')` font-weight: 600; text-transform: uppercase; letter-spacing: 0.39px; - margin: ${p => p.icon ? '-3px auto 0px' : '0 auto'}; + margin: ${p => p.hasIcon ? '-3px auto 0px' : '0 auto'}; ` export const StyledIcon = styled<{}, 'div'>('div')` diff --git a/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap b/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap index cf838ce9e..e78a98694 100644 --- a/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap +++ b/src/features/rewards/walletPanel/__snapshots__/spec.tsx.snap @@ -180,7 +180,6 @@ exports[`WalletPanel tests basic tests matches the snapshot 1`] = ` > MISSING: donateNow diff --git a/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap b/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap index 19877398d..f29deb8a4 100644 --- a/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap +++ b/src/features/rewards/walletPanelDisabled/__snapshots__/spec.tsx.snap @@ -211,7 +211,6 @@ exports[`DisabledPanel tests basic tests matches the snapshot 1`] = ` > MISSING: enableRewards
MISSING: braveRewardsOptInText @@ -735,7 +734,6 @@ exports[`WelcomePage tests basic tests matches the snapshot 1`] = ` > MISSING: readyToTakePartOptInText