TenantAtlas/apps/website/src/components/primitives/Card.astro
ahmido cebd5ee1b0
Some checks failed
Main Confidence / confidence (push) Failing after 50s
Agent: commit workspace changes (217-homepage-hero-session-1776809852) (#259)
Automated commit by agent: commits workspace changes for feature 217-homepage-hero. Please review and merge into `dev`.

Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de>
Reviewed-on: #259
2026-04-21 22:24:29 +00:00

28 lines
629 B
Plaintext

---
interface Props {
as?: keyof HTMLElementTagNameMap;
class?: string;
hoverable?: boolean;
variant?: 'accent' | 'default' | 'subtle';
[key: string]: unknown;
}
const { as = 'article', class: className = '', hoverable = false, variant = 'default', ...rest } = Astro.props;
const variantClasses = {
default: 'surface-card',
accent: 'surface-card-accent',
subtle: 'surface-card-muted',
};
const Tag = as;
---
<Tag
class:list={['rounded-[1.65rem] p-6 sm:p-7', variantClasses[variant], hoverable && 'card-hoverable', className]}
data-surface={variant}
{...rest}
>
<slot />
</Tag>