import Text from '../../atoms/Text/Text'; import Logo from '../../atoms/Logo/Logo'; import Link, { LinkProps } from '../../atoms/Link/Link'; import { typography } from '../../../constants'; import styled, { css } from 'styled-components'; import React, { HTMLAttributes } from 'react'; import FlexRow from '../../layout/FlexRow/FlexRow'; import FlexCol from '../../layout/FlexCol/FlexCol'; import { useThemeContext } from '../../styles/Theme'; import twitter from '../../../content/images/social/twitter.svg'; import facebook from '../../../content/images/social/facebook.svg'; import linkedin from '../../../content/images/social/linkedin.svg'; import instagram from '../../../content/images/social/instagram.svg'; import FlexContainer from '../../layout/FlexContainer/FlexContainer'; import { Footer, Heading, LegalBlock, List, LogoBlock, SocialBlock, SocialLink } from './styles'; /** * Use this component to render a Zopa Footer * * @param baseUrl {string} the url the links will use as a base * @param renderLink {(props: LinkProps) => React.ReactNode} a callback function allowing an application to render the Logo component * @param mainCustomLegalCopy {string|string[]} if you need to pass some specific main legal copy from another partner use this * @param additionalCopy {string[]} if you need to pass additional copy after the legal copy */ export interface FooterProps extends HTMLAttributes { baseUrl?: string; renderLink?: (props: LinkProps) => React.ReactNode; mainCustomLegalCopy?: string | string[]; additionalCopy?: string[]; } export const footerLinkStyle = css` font-weight: ${typography.weights.regular}; text-decoration: none; &:hover, &:active { text-decoration: underline; } `; const StyledLink = styled(Link)` ${footerLinkStyle} `; const MainZopaLegalCopy = () => { const theme = useThemeContext(); return ( Zopa Bank Limited is authorised by the Prudential Regulation Authority and regulated by the Financial Conduct Authority and the Prudential Regulation Authority, and entered on the Financial Services Register (800542). Zopa Bank Limited (10627575) is incorporated in England & Wales and has its registered office at: 1st Floor, Cottons Centre, Tooley Street, London, SE1 2QG. ); }; const MainCustomLegalCopy = ({ copy }: { copy: FooterProps['mainCustomLegalCopy'] }) => { const theme = useThemeContext(); const copyArray = Array.isArray(copy) ? copy : [copy]; return ( <> {copyArray.map((copy, i) => { return ( copyArray.length ? '' : 'mb-4'} > {copy} ); })} ); }; const ZopaFooter = ({ baseUrl = 'https://www.zopa.com', renderLink = (props: LinkProps) => , additionalCopy = [], mainCustomLegalCopy, ...rest }: FooterProps) => { const theme = useThemeContext(); return ( ); }; export default ZopaFooter;