import { h } from 'preact'; import Button from './Button'; import Heading from './Heading'; export default function Box({ buttons = [], className = '', content, header, href, icons, media = null, subheader, supportingText, ...props }) { const Element = href ? 'a' : 'div'; return (
{media}
{header ? {header} : null}
{buttons.length || content ? (
{content || null} {buttons.length ? (
{buttons.map(({ name, href }) => ( ))}
) : null}
) : null}
); }