Restructure into pnpm monorepo with game shell, docs, and SpacetimeDB backend
- Restructure flat static prototype into pnpm workspace monorepo - apps/game: playable shell with R3F 3D scene, HUD, SpacetimeDB connection - apps/docs: design docs and prototypes - apps/site: landing page - packages/ui: shared Button and Panel primitives - services/spacetimedb: backend module (9 tables, 11 reducers) - Archive legacy static files to archive/legacy-static/ - Game loop: connect, undock, target, approach, dock, mine, sell - Add pnpm-workspace.yaml, tsconfig.base.json, spacetime.json
This commit is contained in:
22
packages/ui/src/primitives/Panel.tsx
Normal file
22
packages/ui/src/primitives/Panel.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import type { HTMLAttributes, ReactNode } from "react";
|
||||
|
||||
export type PanelProps = HTMLAttributes<HTMLElement> & {
|
||||
as?: "article" | "section" | "div";
|
||||
children: ReactNode;
|
||||
};
|
||||
|
||||
export function Panel({ as: Tag = "section", children, className = "", ...props }: PanelProps) {
|
||||
return (
|
||||
<Tag
|
||||
className={[
|
||||
"rounded-lg border border-border bg-surface/92 p-5 shadow-[0_16px_60px_rgba(0,0,0,0.22)]",
|
||||
className,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" ")}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</Tag>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user