feat: add mobile shadcn admin navigation
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user