import * as React from "react"; import styled from "styled-components"; import { dim } from "@dim"; import { mq } from "@tokensDir/media-query"; import { Body, Anchor } from "@Typography"; import { StoryImagePullQuoteProps } from "./interface"; import Image from "@Components/Image"; const StyledImagePullQuote = styled.div` display: grid; grid-template-columns: repeat(12, 1fr); `; const StyledQuoteWrapper = styled.article` display: flex; grid-column: 8 / span 4; order: ${(props: { direction: string }) => props.direction === "ltr" ? "1" : "0"}; `; const StyledQuote = styled.article` align-self: center; display: flex; flex-direction: column; margin: ${dim(11)} auto; text-align: center; ${mq.md` margin: 0; `} `; const StyledImageWrapper = styled.div` grid-column: 1 / span 6; order: ${(props: { direction: string }) => props.direction === "ltr" ? "0" : "1"}; `; export const StyledAnchor = styled(Anchor)` margin: ${dim(3)} 0; display: inline-block; `; const StoryImagePullQuote: React.FC = ({ quote, credit, link, aspect, src, alt, direction = "ltr" }) => ( {quote} {credit} {link && {link.text}} {src && ( {alt} )} ); export default StoryImagePullQuote;