2026-10-05 18:10:18 -04:00
|
|
|
import type React from 'react';
|
|
|
|
|
import type { LucideIcon } from 'lucide-react';
|
2026-10-12 09:04:03 -04:00
|
|
|
import Card from '@/components/elements/Card';
|
2019-09-29 13:23:15 -07:00
|
|
|
|
|
|
|
|
interface Props {
|
2026-10-05 18:10:18 -04:00
|
|
|
icon?: LucideIcon;
|
2020-03-25 21:58:37 -07:00
|
|
|
title: string | React.ReactNode;
|
2026-10-16 20:12:23 +02:00
|
|
|
actions?: React.ReactNode;
|
2019-09-29 13:23:15 -07:00
|
|
|
className?: string;
|
2026-10-05 18:10:18 -04:00
|
|
|
contentClassName?: string;
|
2019-09-29 13:23:15 -07:00
|
|
|
children: React.ReactNode;
|
|
|
|
|
}
|
|
|
|
|
|
2026-10-12 09:04:03 -04:00
|
|
|
/** A `Card` with a header. */
|
2026-10-16 20:12:23 +02:00
|
|
|
const TitledGreyBox = ({ icon, title, actions, children, className, contentClassName }: Props) => (
|
|
|
|
|
<Card title={title} icon={icon} actions={actions} className={className} bodyClassName={contentClassName}>
|
2026-10-12 09:04:03 -04:00
|
|
|
{children}
|
|
|
|
|
</Card>
|
2019-09-29 13:23:15 -07:00
|
|
|
);
|
2020-02-08 15:23:08 -08:00
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
export default TitledGreyBox;
|