From 56d9bc1c0adaa4210a343aa9ef8df40e99531fdc Mon Sep 17 00:00:00 2001 From: Andrew Russell Date: Tue, 20 Aug 2024 21:29:29 +0200 Subject: [PATCH] extend Step components props --- packages/primevue/src/step/BaseStep.vue | 2 +- packages/primevue/src/step/Step.d.ts | 4 ++-- packages/primevue/src/steppanel/BaseStepPanel.vue | 2 +- packages/primevue/src/steppanel/StepPanel.d.ts | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/primevue/src/step/BaseStep.vue b/packages/primevue/src/step/BaseStep.vue index 57ba3939a..d3f3ba573 100644 --- a/packages/primevue/src/step/BaseStep.vue +++ b/packages/primevue/src/step/BaseStep.vue @@ -19,7 +19,7 @@ export default { default: false }, as: { - type: String, + type: [String, Object], default: 'DIV' } }, diff --git a/packages/primevue/src/step/Step.d.ts b/packages/primevue/src/step/Step.d.ts index 6128ebd39..d6bde4f42 100644 --- a/packages/primevue/src/step/Step.d.ts +++ b/packages/primevue/src/step/Step.d.ts @@ -10,7 +10,7 @@ import type { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, PassThrough } from '@primevue/core'; import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { VNode } from 'vue'; +import type { Component, VNode } from 'vue'; export declare type StepPassThroughOptionType = StepPassThroughAttributes | ((options: StepPassThroughMethodOptions) => StepPassThroughAttributes | string) | string | null | undefined; @@ -93,7 +93,7 @@ export interface StepProps { * Use to change the HTML tag of root element. * @defaultValue BUTTON */ - as?: string | undefined; + as?: string | Component | undefined; /** * When enabled, it changes the default rendered element for the one passed as a child element. * @defaultValue false diff --git a/packages/primevue/src/steppanel/BaseStepPanel.vue b/packages/primevue/src/steppanel/BaseStepPanel.vue index 2d4030eba..c55e6f64c 100644 --- a/packages/primevue/src/steppanel/BaseStepPanel.vue +++ b/packages/primevue/src/steppanel/BaseStepPanel.vue @@ -15,7 +15,7 @@ export default { default: false }, as: { - type: String, + type: [String, Object], default: 'DIV' } }, diff --git a/packages/primevue/src/steppanel/StepPanel.d.ts b/packages/primevue/src/steppanel/StepPanel.d.ts index 2a56907b7..e65019f86 100644 --- a/packages/primevue/src/steppanel/StepPanel.d.ts +++ b/packages/primevue/src/steppanel/StepPanel.d.ts @@ -10,7 +10,7 @@ import type { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, PassThrough } from '@primevue/core'; import type { ComponentHooks } from '@primevue/core/basecomponent'; import type { PassThroughOptions } from 'primevue/passthrough'; -import { VNode } from 'vue'; +import type { Component, VNode } from 'vue'; export declare type StepPanelPassThroughOptionType = StepPanelPassThroughAttributes | ((options: StepPanelPassThroughMethodOptions) => StepPanelPassThroughAttributes | string) | string | null | undefined; @@ -72,7 +72,7 @@ export interface StepPanelProps { * Use to change the HTML tag of root element. * @defaultValue BUTTON */ - as?: string | undefined; + as?: string | Component | undefined; /** * When enabled, it changes the default rendered element for the one passed as a child element. * @defaultValue false