/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ // Utils import * as React from 'react' import { getLocale } from '../../../helpers' // Components import { StyledWrapper, StyledAlertIcon, StyledInfo, StyledMessage, StyledMonthlyTips, StyledReviewWrapper, StyledReviewList, StyledModalContent, StyledModalInfo, StyledListMessage, StyledList, StyledListItem, StyledTipsIcon, StyledButton, StyledButtonContainer } from './style' import { Modal } from '../../../components' import { AlertCircleIcon, RewardsSendTipsIcon } from '../../../components/icons' import Button from '../../../components/buttonsIndicators/button' export type Type = 'tips' | 'ads' export interface Props { type: Type testId?: string onReview?: () => void } interface State { modalShown: boolean } export default class BoxAlert extends React.PureComponent { constructor (props: Props) { super(props) this.state = { modalShown: false } } toggleModalDisplay = () => { this.setState({ modalShown: !this.state.modalShown }) if (this.state.modalShown && this.props.onReview) { this.props.onReview() } } pinnedSitesModal = () => { return ( {getLocale('pinnedSitesHeader')} {getLocale('monthlyTips')} {getLocale('pinnedSitesMsg')} {getLocale('pinnedSitesOne')} {getLocale('pinnedSitesTwo')} {getLocale('pinnedSitesThree')} {getLocale('pinnedSitesFour')}