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 });