huntabyte / shadcn-svelte

shadcn/ui, but for Svelte. ✨
https://next.shadcn-svelte.com
MIT License
5.34k stars 331 forks source link

Form Label and Form Description are not rendered #1413

Open pacosw1 opened 23 hours ago

pacosw1 commented 23 hours ago

Describe the bug

When creating a form like in the docs, Using Form.label and Form.Description does not render them on the form. Everything else works fine.

Also when passing form to Form.Field it complains that children prop does not exist. This may have to do something with it but the code runs normally, it might just be a type issue.

Reproduction

Can't reproduce with the repro as it fails when installing dependencies. I think it may have something to do with the registry.

Also when installing the form component with the add command, in many cases the cli just hangs forever in the installing dependencies step. Not sure if this is related to the issue.

This is for the NEXT version.

CleanShot 2024-10-31 at 11 02 30

CleanShot 2024-10-31 at 11 03 02

type error description (can't screenshot) Object literal may only specify known properties, and 'children' does not exist in type 'FieldProps<{ name?: string; email?: string; phone?: string; }, "phone"> & Omit<WithElementRef<HTMLAttributes>, "children">'.ts(2353)

Logs

No response

System Info

This command hangs as well

Severity

annoyance

pacosw1 commented 23 hours ago

CleanShot 2024-10-31 at 11 08 48

huntabyte commented 15 hours ago

The issue is that stackblitz filters out requests that are attempting to leave like that via the CLI (IIRC). Form.Field requires you to have either children passed as a prop or actual children content. If you can link a github repo I'll take a look.