feat(ui): Card
This commit is contained in:
1 parent
fe5adcd249
commit
226678017f
1 file changed
+19
-2
@@ -1,3 +1,20 @@
|
||||
export default function Card() {
|
||||
return <div>Card placeholder</div>
|
||||
import type { ReactNode } from 'react'
|
||||
|
||||
export interface CardProps {
|
||||
children: ReactNode
|
||||
className?: string
|
||||
as?: 'div' | 'section' | 'article'
|
||||
}
|
||||
|
||||
export default function Card({ children, className = '', as: Tag = 'div' }: CardProps) {
|
||||
return (
|
||||
<Tag
|
||||
className={[
|
||||
'rounded-2xl border border-[var(--color-border)] bg-[var(--color-surface)] shadow-sm',
|
||||
className,
|
||||
].join(' ')}
|
||||
>
|
||||
{children}
|
||||
</Tag>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user