import React from 'react'; import styled, { css } from 'styled-components'; import { StoryProductHeroProps, StyledStoryProductHeroProps } from './interface'; import { Border, Image } from '@UI'; import { Body, Label, Anchor } from '@Typography'; import { dim } from '@dim'; import * as tokens from '@tokens'; import { mq } from '@tokensDir/media-query'; const ProductWithHero = styled.div` display: flex; flex-direction: column; padding-bottom: ${dim(2)}; margin-bottom: ${dim(2)}; position: relative; ${mq.md` flex-direction: row; padding-bottom: 30px; margin-bottom: 30px; `}; &:after { ${Border}; bottom: 0; } `; const StyledProduct = styled.div` align-items: center; display: flex; flex-direction: column; flex: 50%; justify-content: center; ${(props: StyledStoryProductHeroProps) => props.direction === 'ltr' ? css` order: 0; padding-bottom: 30px; ${mq.md` padding-bottom: 0; `}; ` : css` order: 1; `} `; const ProductName = styled(Label)` margin: 0 0 15px; text-align: center; `; const ProductDescription = styled(Body)` margin: 0 auto ${dim(3)}; text-align: center; `; const ProductLink = styled(Anchor)` color: ${tokens.colorBlack}; font-weight: ${tokens.fontWeightSemiBold}; `; const ProductImage = styled.div` align-items: center; display: flex; justify-content: center; margin: 0 0 ${dim(6)}; `; const ProductDetails = styled.div` align-items: center; display: flex; flex-direction: column; justify-content: center; `; const Hero = styled.div` flex: 1 1 50%; ${(props: StyledStoryProductHeroProps) => props.direction === 'ltr' ? css` order: 1; ` : css` order: 0; padding-bottom: 30px; ${mq.md` padding-bottom: 0; `}; `} `; const StoryProductMannequin: React.FC = ({ product, direction }: StoryProductHeroProps) => ( {product.name} {product.name} {product.description} {product.link} {product.name} ); export default StoryProductMannequin;