import classNames from 'classnames'; import { FC, ReactNode } from 'react'; export interface ListContainerProps { title?: string | ReactNode; className?: string; } const ListContainer: FC = ({ title, className, children }) => { const listContainerClassName = classNames('list-container', className); const renderTitle = typeof title === 'string' ?
{title}
: title; return (
{title && renderTitle} {children}
); }; export default ListContainer;