feat: add civital model install

This commit is contained in:
BennyKok
2024-01-13 23:15:19 +08:00
parent 1f91d4d357
commit 1d25aadd74
6 changed files with 266 additions and 34 deletions
@@ -37,7 +37,7 @@ export default function AutoFormObject<
const { shape } = getBaseSchema<SchemaType>(schema);
return (
<Accordion type="multiple" className="space-y-5">
<Accordion type="multiple" className="space-y-5 py-1">
{Object.keys(shape).map((name) => {
const item = shape[name] as z.ZodAny;
const zodBaseType = getBaseType(item);
+1 -1
View File
@@ -70,7 +70,7 @@ function AutoForm<SchemaType extends ZodObjectOrWrapped>({
className={cn("space-y-5", className)}
>
<ScrollArea>
<div className="max-h-[400px] px-1 py-1 w-full">
<div className="max-h-[400px] px-1 w-full">
<AutoFormObject
schema={objectFormSchema}
form={form}
+2 -1
View File
@@ -39,7 +39,7 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
>(({ className, children, ...props }, ref) => (
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
@@ -50,6 +50,7 @@ const CommandInput = React.forwardRef<
)}
{...props}
/>
{children}
</div>
));