import { Flex, FlexBlock, FlexItem, Card, CardBody, Icon } from '@wordpress/components'; import { chevronRight } from '@wordpress/icons'; import clsx from 'clsx'; import Badge from '../badge'; import type { BadgeType } from '../badge'; import './style.scss'; interface FlowQuestionProps { icon?: JSX.Element; onClick: () => void; text: string; title: string; disabled?: boolean; badge?: { type: BadgeType; text: string; }; className?: string; } const bemElement = ( customClassName?: string ) => ( element: string ) => customClassName ? `${ customClassName }__${ element }` : undefined; const FlowQuestion = ( { icon, onClick, text, title, disabled = false, badge, className, }: FlowQuestionProps ) => { const bem = bemElement( className ); return ( { icon && ( ) }

{ title } { badge && { badge.text } }

{ text }

); }; export default FlowQuestion;