feat: add mobile shadcn admin navigation

This commit is contained in:
hailin
2026-07-02 15:26:10 +08:00
parent 8749faae43
commit 37d83c9ac8
5 changed files with 324 additions and 43 deletions

View File

@@ -1,15 +1,25 @@
import type * as React from 'react'
import { Field, FieldDescription, FieldLabel } from '@/components/ui/field'
type AppFieldProps = {
label: string
htmlFor?: string
description?: string
invalid?: boolean
required?: boolean
children: React.ReactNode
}
export function AppField({ label, children }: AppFieldProps) {
export function AppField({ label, htmlFor, description, invalid, required, children }: AppFieldProps) {
return (
<label className="grid gap-1.5">
<span className="text-xs font-medium text-muted-foreground">{label}</span>
<Field data-invalid={invalid ? true : undefined}>
<FieldLabel htmlFor={htmlFor}>
{label}
{required ? <span className="text-destructive">*</span> : null}
</FieldLabel>
{children}
</label>
{description ? <FieldDescription>{description}</FieldDescription> : null}
</Field>
)
}