import React, { FC } from 'react' import { Button, ExternalLink, Modal } from '@wordpress/components' import { external } from '@wordpress/icons' import { __, sprintf } from '@wordpress/i18n' import { Tip, TipAction, TipLink } from './tipList' const newWindow = (label: string): string => /* translators: %s: the text of a link that opens in a new window */ sprintf(__('%s (opens in a new window)', 'posten-bring-checkout'), label) const Intro: FC<{ tip: Tip }> = ({ tip }) => (
{tip.title}

{tip.headline}

{tip.lead}

) const SetUp: FC<{ action: TipAction }> = ({ action }) => ( <> {action.hint} ) const WhatYouNeed: FC<{ tip: Tip }> = ({ tip }) => (

{__('What you need', 'posten-bring-checkout')}

{tip.action && }
) const UsefulLinks: FC<{ tip: Tip }> = ({ tip }) => { const contactEmail = __( 'checkout.implementering@posten.no', 'posten-bring-checkout' ) return (

{__('Useful links', 'posten-bring-checkout')}

) } /** * Explains one tip: a picture and the story of how it works on the left, and * what the merchant needs and where to set it up on the right. */ const TipModal: FC<{ tip: Tip; onClose: () => void }> = ({ tip, onClose }) => { const { Photo, Story } = tip return (
{Photo && }
) } export default TipModal