feat: initial commit — local services (backend + manager dashboard + waiter PWA)
Includes all work to date: - local_backend: FastAPI backend with products, orders, tables, shifts, cloud sync - manager_dashboard: React manager UI with product/category management, reports, settings - waiter_pwa: React PWA for waiter devices - Category reparent endpoint and UI - Waiter domain: local_ip sent on heartbeat, waiter_domain persisted from cloud response - QR code modal in AppInfoTab for waiter domain - Product form: number input spinners removed, category pre-selected on new product - Category row: count badge moved to far right Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import { BUTTON_VARIANTS, BUTTON_SIZES } from './tokens'
|
||||
|
||||
export default function Button({
|
||||
variant = 'secondary',
|
||||
size = 'md',
|
||||
children,
|
||||
className = '',
|
||||
...props
|
||||
}) {
|
||||
const base = BUTTON_VARIANTS[variant] ?? BUTTON_VARIANTS.secondary
|
||||
const sizeOverride = BUTTON_SIZES[size]
|
||||
|
||||
// Replace the size-specific px/py/text classes from the base with the size override
|
||||
const cls = size === 'sm'
|
||||
? base.replace('px-3.5 py-2 text-[13px]', sizeOverride)
|
||||
: base
|
||||
|
||||
return (
|
||||
<button className={`${cls} ${className}`} {...props}>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user