import { Card, CardTitle, CardBody, CardControls, CardHeader, FramedIcon } from '@rocket.chat/fuselage'; import { useId } from 'react'; import type { ComponentProps, ReactElement } from 'react'; import type { GenericCardButton } from './GenericCardButton'; type GenericCardProps = { title: string; body: string; buttons?: ReactElement[]; icon?: ComponentProps['icon']; type?: 'info' | 'success' | 'warning' | 'danger' | 'neutral'; } & ComponentProps; export const GenericCard = ({ title, body, buttons, icon, type, ...props }: GenericCardProps) => { const cardId = useId(); const descriptionId = useId(); const iconType = type && { [type]: true, }; return ( {icon && } {title} {body} {buttons && {buttons}} ); };