werefox-cafe/src/info/components/werefox-card.js

31 lines
1.1 KiB
JavaScript
Raw Normal View History

export default function WerefoxCard({
isTitle,
innerText,
children,
}) {
if (isTitle) {
return (
<header className="rounded-lg ring-4 ring-werefox-blue bg-werefox-grey-light dark:bg-werefox-grey">
<a rel="me" href="https://vulpine.club/@Shadow8t4" hidden>Mastodon</a>
<a rel="me" href="https://masto.werefox.dev/@shadow8t4" hidden>Mastodon</a>
{children}
</header>
);
} else {
return (
<div className="rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker bg-werefox-grey-light dark:bg-werefox-grey">
<div className="p-2 space-y-2">
<div className="rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker bg-werefox-grey-lighter dark:bg-werefox-grey-dark">
<p className="p-2 text-center text-md sm:text-lg text-werefox-blue-dark dark:text-werefox-blue">
{innerText}
</p>
</div>
<div className="p-2 flow space-y-2 rounded-lg ring-2 ring-werefox-grey dark:ring-werefox-grey-darker bg-werefox-grey-lighter dark:bg-werefox-grey-dark">
{children}
</div>
</div>
</div>
);
}
}