ui/cards: use a better HTML structure

This commit is contained in:
Adorian Doran 2026-02-15 20:14:14 +02:00
parent 4ee9d45dfc
commit 48013dc264
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@
text-transform: uppercase;
}
.tn-card {
.tn-card-body {
display: flex;
flex-direction: column;
gap: var(--card-section-gap);

View File

@ -10,12 +10,12 @@ interface CardProps {
}
export function Card(props: {children: ComponentChildren} & CardProps) {
return <>
return <div class={clsx("tn-card", props.className)}>
{props.heading && <h5 class="tn-card-heading">{props.heading}</h5>}
<div className={clsx(["tn-card", props.className])}>
<div className="tn-card-body">
{props.children}
</div>
</>;
</div>;
}
interface CardSectionProps {