From 53a6ae510a139d4edef046df3b43aab294faeffa Mon Sep 17 00:00:00 2001 From: ryanml Date: Mon, 22 Oct 2018 17:43:47 -0700 Subject: [PATCH] Fixes #228, adds optin status messages to panelWelcome --- src/features/rewards/panelWelcome/index.tsx | 53 +++++++++++++++++---- src/features/rewards/panelWelcome/style.ts | 8 ++++ stories/features/rewards/concepts.tsx | 22 +++++++-- 3 files changed, 69 insertions(+), 14 deletions(-) diff --git a/src/features/rewards/panelWelcome/index.tsx b/src/features/rewards/panelWelcome/index.tsx index af973d282..ce6d33c93 100644 --- a/src/features/rewards/panelWelcome/index.tsx +++ b/src/features/rewards/panelWelcome/index.tsx @@ -14,10 +14,11 @@ import { StyledDescText, StyledFooterText, StyledButtonWrapper, - StyledTrademark + StyledTrademark, + StyledErrorMessage } from './style' -import { BatColorIcon } from '../../../components/icons' +import { BatColorIcon, LoaderIcon } from '../../../components/icons' import Button from '../../../components/buttonsIndicators/button' export type Variant = 'one' | 'two' @@ -25,8 +26,11 @@ export type Variant = 'one' | 'two' export interface Props { id?: string variant?: Variant + creating?: boolean + error?: boolean moreLink?: () => void optInAction: () => void + optInErrorAction: () => void } export default class PanelWelcome extends React.PureComponent { @@ -50,7 +54,7 @@ export default class PanelWelcome extends React.PureComponent { } render () { - const { id, optInAction, moreLink } = this.props + const { id, optInAction, optInErrorAction, moreLink } = this.props let props = {} @@ -77,13 +81,42 @@ export default class PanelWelcome extends React.PureComponent { {getLocale(this.locale.desc)} -