.
All checks were successful
Deploy blog-frontend / build-and-deploy (push) Successful in 2m30s

This commit is contained in:
wypark
2026-05-28 21:45:30 +09:00
parent 58a012621a
commit 0273cae6e4
37 changed files with 2625 additions and 1319 deletions

View File

@@ -0,0 +1,30 @@
import { clsx } from 'clsx';
import { HTMLAttributes } from 'react';
type SurfaceElement = 'div' | 'section' | 'article' | 'aside';
interface SurfaceProps extends HTMLAttributes<HTMLElement> {
as?: SurfaceElement;
strong?: boolean;
interactive?: boolean;
}
export default function Surface({
as: Component = 'div',
strong = false,
interactive = false,
className,
...props
}: SurfaceProps) {
return (
<Component
className={clsx(
'rounded-lg border border-[var(--color-line)] backdrop-blur-xl',
strong ? 'bg-[var(--color-surface-strong)] shadow-[var(--shadow-panel)]' : 'bg-[var(--color-surface)] shadow-[var(--shadow-card)]',
interactive && 'transition duration-150 hover:border-black/10 hover:bg-white/90 hover:shadow-[var(--shadow-panel)] dark:hover:border-white/15 dark:hover:bg-white/10',
className,
)}
{...props}
/>
);
}