import React from 'react' import { Button } from '../../../button' import { Column } from '../../../layout/column' import { Columns } from '../../../layout/columns' import { BaseSection, SectionContentSize } from '../../../layout/section/baseSection' import { StyledMediaContentSection } from './MediaContentSection.style' export type MediaContentSectionProps = Readonly<{ media: JSX.Element title: string content?: string buttonLabel?: string buttonHref?: string | JSX.Element buttonClick?: (event: React.MouseEvent) => void }> /** * A specialized section which show some marketing content associated with a picture. */ export const MediaContentSection = ({ media, title, content, buttonLabel, buttonHref, buttonClick, }: MediaContentSectionProps) => { const showButton = Boolean(buttonHref && buttonLabel) const showParagraph = Boolean(content) return ( {media} {title} {showParagraph && ( {content} )} {showButton && ( )} ) }