feat: initial commit.

This commit is contained in:
2026-09-10 22:29:21 +02:00
commit 300b1ce774
24 changed files with 1982 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
import type { ComponentChildren } from "preact";
export interface ButtonProps {
id?: string;
onClick?: () => void;
children?: ComponentChildren;
disabled?: boolean;
}
export function Button(props: ButtonProps) {
return (
<button
{...props}
class="px-2 py-1 border-gray-500 border-2 rounded-sm bg-white hover:bg-gray-200 transition-colors"
/>
);
}
+25
View File
@@ -0,0 +1,25 @@
const links = [
{ href: "/", label: "Home" },
{ href: "/sign-in", label: "Sign in" },
{ href: "/sign-up", label: "Sign up" },
{ href: "/dashboard", label: "Dashboard" },
];
export default function Header() {
return (
<div class="navbar bg-base-100 shadow-sm">
<div class="flex-1">
<a class="btn btn-ghost text-xl">daisyUI</a>
</div>
<div class="flex-none">
<ul class="menu menu-horizontal px-1">
{links.map((l) => (
<li key={l.href}>
<a href={l.href}>{l.label}</a>
</li>
))}
</ul>
</div>
</div>
);
}
+32
View File
@@ -0,0 +1,32 @@
export interface Props {
email: string;
error?: string;
}
export function SignInForm(props: Props) {
return (
<form method="post" class="flex flex-col gap-4">
<input
type="email"
name="email"
class="input w-full"
placeholder="E-Mail"
autocomplete="email"
value={props.email}
/>
<input
type="password"
name="password"
class="input w-full"
placeholder="Password"
autocomplete="current-password"
/>
{props.error && (
<div class="alert alert-error">
{props.error}
</div>
)}
<button type="submit" class="btn btn-primary self-start">Sign up</button>
</form>
);
}