From f9eb842662153c33d85678f8aff61cc8602cfdf1 Mon Sep 17 00:00:00 2001 From: Raz Date: Sat, 25 May 2024 12:11:54 +0200 Subject: [PATCH] refactor(components): move FORM_ITEM_INJECTION_KEY to a different module By exporting the from the file, we can remove the need of having multiple script tags inside the component. This change helps with the linters and formatters, expecially with defaults. --- apps/www/src/lib/registry/default/ui/form/FormItem.vue | 10 ++-------- apps/www/src/lib/registry/default/ui/form/index.ts | 1 + .../src/lib/registry/default/ui/form/injectionKeys.ts | 4 ++++ .../src/lib/registry/default/ui/form/useFormField.ts | 2 +- .../www/src/lib/registry/new-york/ui/form/FormItem.vue | 10 ++-------- apps/www/src/lib/registry/new-york/ui/form/index.ts | 1 + .../src/lib/registry/new-york/ui/form/injectionKeys.ts | 4 ++++ .../src/lib/registry/new-york/ui/form/useFormField.ts | 2 +- 8 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 apps/www/src/lib/registry/default/ui/form/injectionKeys.ts create mode 100644 apps/www/src/lib/registry/new-york/ui/form/injectionKeys.ts diff --git a/apps/www/src/lib/registry/default/ui/form/FormItem.vue b/apps/www/src/lib/registry/default/ui/form/FormItem.vue index ad120be9..444d9013 100644 --- a/apps/www/src/lib/registry/default/ui/form/FormItem.vue +++ b/apps/www/src/lib/registry/default/ui/form/FormItem.vue @@ -1,13 +1,7 @@ - - -