import * as React from 'react'; import styled from 'styled-components'; import { Icon } from 'ts/components/icon'; import { Heading, Paragraph } from 'ts/components/text'; interface Props { isInline: boolean; icon: string; iconSize?: 'medium' | 'large' | number; fontSize?: 'default' | 'medium' | number; title: string; titleSize?: 'small' | 'default' | number; description: React.ReactNode | string; } export const CenteredDefinition = (props: Props) => ( {props.title} {typeof props.description === 'string' ? ( {props.description} ) : ( <>{props.description} )} ); const Wrap = styled.div` max-width: ${props => props.isInline && 'calc(50% - 30px)'}; text-align: center; @media (max-width: 768px) { margin: 0 auto; & + & { margin-top: ${props => props.isInline && '60px'}; } } `; const TextWrap = styled.div` width: 100%; max-width: 560px; text-align: center; `;