import { h } from 'preact'; import Button from './Button'; import Heading from './Heading'; export default function Box({ buttons = [], className = '', content, elevated = true, header, href, icons, media = null, subheader, supportingText, ...props }) { const Element = href ? 'a' : 'div'; const typeClasses = elevated ? 'shadow-md hover:shadow-lg transition-shadow' : 'border border-gray-200 dark:border-gray-700'; return (
{media || header ? ( {media}
{header ? {header} : null}
) : null} {buttons.length || content ? (
{content || null} {buttons.length ? (
{buttons.map(({ name, href }) => ( ))}
) : null}
) : null}
); }