import classNames from 'classnames'; import { ReactNode, FC } from 'react'; import { observer } from 'mobx-react'; import { Text, Card, Layout, LayoutProps } from '@servicetitan/design-system'; export interface SectionProps { title: ReactNode; text?: ReactNode | string; children: ReactNode; qaPrefix?: string; className?: string; layout?: LayoutProps['type']; withoutBorders?: boolean; } export const SettingsSection: FC = observer( ({ title, text, children, qaPrefix, className = '', layout = 'support', withoutBorders, }: SectionProps) => ( {typeof title === 'string' ? ( {title} ) : ( title )} {typeof text === 'string' ? ( {text} ) : ( text )} {withoutBorders ? (
{children}
) : ( {children} )}
), );