import * as React from 'react'; import styled from 'styled-components'; import { Button } from 'ts/@next/components/button'; import { Icon } from 'ts/@next/components/icon'; import { Paragraph } from 'ts/@next/components/text'; interface Action { label: string; url: string; } interface Props { isInline?: boolean; isInlineIcon?: boolean; isCentered?: boolean; isWithMargin?: boolean; icon: string; iconSize?: 'medium' | 'large' | number; title: string; description: Node | string; actions?: Action[]; } export const Definition = (props: Props) => ( {props.title} {props.description} {props.actions && {props.actions.map((item, index) => ( ))} } ); const Wrap = styled.div` max-width: ${props => props.isInline && '354px'}; & + & { margin-top: ${props => props.isInlineIcon && '120px'}; margin-top: ${props => props.isWithMargin && '60px'}; } @media (min-width: 768px) { width: ${props => props.isInline ? 'calc(33.3333% - 30px)' : '100%'}; display: ${props => props.isInlineIcon && 'flex'}; justify-content: ${props => props.isInlineIcon && 'space-between'}; align-items: ${props => props.isInlineIcon && 'center'}; text-align: ${props => (props.isInlineIcon || !props.isCentered) && 'left'}; } @media (max-width: 768px) { margin: 0 auto; & + & { margin-top: ${props => props.isInline && '60px'}; } } `; const TextWrap = styled.div` width: 100%; max-width: 560px; @media (min-width: 768px) { margin-left: ${props => props.isInlineIcon && '60px'}; } `; const Title = styled.h2` font-size: 20px; line-height: 1.3; margin-bottom: 15px; `; const LinkWrap = styled.div` display: inline-flex; margin-top: 60px; a + a { margin-left: 60px; } `;