From e8882ac9f71c28b89f2cbb2066ce189504135575 Mon Sep 17 00:00:00 2001 From: Mert Sincan Date: Thu, 31 Oct 2024 13:14:27 +0000 Subject: [PATCH] Refactor #6601 --- packages/form/src/form/Form.vue | 4 ++-- packages/form/src/form/style/FormStyle.d.ts | 7 +++++++ packages/form/src/form/style/FormStyle.js | 7 ++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/form/src/form/Form.vue b/packages/form/src/form/Form.vue index 9cb6b318f..b9c57c750 100644 --- a/packages/form/src/form/Form.vue +++ b/packages/form/src/form/Form.vue @@ -1,5 +1,5 @@ @@ -30,7 +30,7 @@ export default { return { register, onSubmit, - ...omit($form, ['defineField', 'handleSubmit']) + ...omit($form, ['handleSubmit']) }; } }; diff --git a/packages/form/src/form/style/FormStyle.d.ts b/packages/form/src/form/style/FormStyle.d.ts index 736d17cb7..0dc31123a 100644 --- a/packages/form/src/form/style/FormStyle.d.ts +++ b/packages/form/src/form/style/FormStyle.d.ts @@ -7,4 +7,11 @@ */ import type { BaseStyle } from '@primevue/core/base/style'; +export enum FormClasses { + /** + * The class of root element + */ + root = 'p-form' +} + export interface FormStyle extends BaseStyle {} diff --git a/packages/form/src/form/style/FormStyle.js b/packages/form/src/form/style/FormStyle.js index 4f5dbdfc8..a83ecc317 100644 --- a/packages/form/src/form/style/FormStyle.js +++ b/packages/form/src/form/style/FormStyle.js @@ -1,5 +1,10 @@ import BaseStyle from '@primevue/core/base/style'; +const classes = { + root: 'p-form p-component' +}; + export default BaseStyle.extend({ - name: 'form' + name: 'form', + classes });