Files
lunch/components/ui/button.tsx
T
Kai BöhmandClaude Opus 5.5 fa83e560b2
ci / olares chart · sanity (pull_request) Successful in 5s
ci / app · types + tests + build (pull_request) Successful in 3m54s
release / which version (pull_request) Successful in 1s
release / olares chart · sanity (pull_request) Successful in 3s
release / app (pull_request) Successful in 1m25s
release / tag and release (pull_request) Skipped
Scaffold the app, chart, CI and release (26.11.1)
Next.js 15 with next-intl (de, en, fr, es; locale per person, no URL
prefix), Tailwind v4 tokens for the warm palette with dark mode, a
shadcn/ui button, Serwist service worker and PWA manifest with icons.
One Postgres pool with withHousehold() setting app.household_id per
transaction; the first migration creates households with FORCE ROW
LEVEL SECURITY, and a two-household test checks the isolation as the
table owner. scripts/migrate.mjs applies db/migrations once each with a
checksum and retries until the database is reachable.

Olares chart with one deployment (init: chown, migrate from the same
image), ClusterIP service, entrance internal until the own sign-in
exists, image path fixed in the template and tag from appVersion.
scripts/check-chart.sh carries the rules from Rocket; CI runs it, type
check, tests against Postgres and the build; release builds
lunch-app, tags and attaches the chart.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HUc2nv7rJVU2gp3Bgtha3q
2026-11-06 19:08:21 +00:00

42 lines
1.6 KiB
TypeScript

import * as React from "react";
import { Slot } from "@radix-ui/react-slot";
import { cva, type VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
// shadcn/ui Button, Größen auf mindestens 44 px (Leitprinzip 7).
const buttonVariants = cva(
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xl text-base font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none disabled:opacity-50 [&_svg]:size-5 [&_svg]:shrink-0",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
outline: "border border-border bg-background hover:bg-muted",
ghost: "hover:bg-muted",
},
size: {
default: "min-h-11 px-5 py-2",
lg: "min-h-12 px-6 text-lg",
icon: "size-11",
},
},
defaultVariants: { variant: "default", size: "default" },
},
);
export interface ButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
VariantProps<typeof buttonVariants> {
asChild?: boolean;
}
export const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : "button";
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
},
);
Button.displayName = "Button";
export { buttonVariants };