diff --git a/components/BlmBanner.js b/components/BlmBanner.js index 3e7285a0..6de6d290 100644 --- a/components/BlmBanner.js +++ b/components/BlmBanner.js @@ -17,7 +17,7 @@ const Banner = styled.a` export const BlmBanner = () => { return ( - + #BlackLivesMatter ✊🏿 Support the Equal Justice Initiative ); diff --git a/components/Link.js b/components/Link.js index 86561bff..1207f321 100644 --- a/components/Link.js +++ b/components/Link.js @@ -33,7 +33,7 @@ export const InlineLink = styled.a.attrs((/* props */) => ({ } `; -const Link = ({ ['aria-label']: ariaLabel, children, className, inline, unstyled, white, ...rest }) => { +const Link = ({ ['aria-label']: ariaLabel, children, className, inline, unstyled, white, isExternal, ...rest }) => { let Child = StyledLink; if (inline) { Child = InlineLink; @@ -46,9 +46,14 @@ const Link = ({ ['aria-label']: ariaLabel, children, className, inline, unstyled dataAttrs = { 'data-white': white }; } + let target; + if (isExternal) { + target = '_blank'; + } + return ( - + {children} diff --git a/components/Nav/Social.js b/components/Nav/Social.js index d0e8eaff..5bd1adc0 100644 --- a/components/Nav/Social.js +++ b/components/Nav/Social.js @@ -42,14 +42,14 @@ const SocialLink = styled(Link).attrs((/* props */) => ({ `; const Svg = styled.svg` - width: ${p => rem(Number(p.width))}; - height: ${p => rem(Number(p.height))}; + width: ${(p) => rem(Number(p.width))}; + height: ${(p) => rem(Number(p.height))}; `; const StyledIcon = styled.div` && { - width: ${p => rem(Number(p.width))}; - height: ${p => rem(Number(p.height))}; + width: ${(p) => rem(Number(p.width))}; + height: ${(p) => rem(Number(p.height))}; } `; @@ -73,18 +73,17 @@ const Spectrum = () => ( ); -const Social = props => ( +const Social = (props) => ( - + - {/* - - */} - + + - + + diff --git a/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap b/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap index ce716274..2e51986e 100644 --- a/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap +++ b/test/components/NavBar/__snapshots__/MobileNavbar.spec.js.snap @@ -368,6 +368,7 @@ exports[`MobileNavbar renders correctly 1`] = `