import * as React from 'react'; import styled from 'styled-components'; import { Icon } from 'ts/components/icon'; import { Heading, Paragraph } from 'ts/components/text'; export interface CenteredDefinitionProps { 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: CenteredDefinitionProps) => ( {props.title} {typeof props.description === 'string' ? ( {props.description} ) : ( <>{props.description} )} ); const Wrap = styled.div` padding: 30px 0; max-width: ${props => props.isInline && 'calc(50% - 30px)'}; text-align: center; @media (max-width: 768px) { margin: 0 auto; max-width: 100%; } `; const TextWrap = styled.div` width: 100%; max-width: 560px; text-align: center; `;