From ab1a3b86b3bc96f28b993e3d735f6ddbaee92aaa Mon Sep 17 00:00:00 2001 From: Andrew Russell Date: Tue, 20 Aug 2024 21:28:57 +0200 Subject: [PATCH] extend Accordion components props --- packages/primevue/src/accordioncontent/AccordionContent.d.ts | 4 ++-- .../primevue/src/accordioncontent/BaseAccordionContent.vue | 2 +- packages/primevue/src/accordionheader/AccordionHeader.d.ts | 4 ++-- packages/primevue/src/accordionheader/BaseAccordionHeader.vue | 2 +- packages/primevue/src/accordionpanel/AccordionPanel.d.ts | 4 ++-- packages/primevue/src/accordionpanel/BaseAccordionPanel.vue | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/primevue/src/accordioncontent/AccordionContent.d.ts b/packages/primevue/src/accordioncontent/AccordionContent.d.ts index 0dde98afd..dd2ea960e 100755 --- a/packages/primevue/src/accordioncontent/AccordionContent.d.ts +++ b/packages/primevue/src/accordioncontent/AccordionContent.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 AccordionContentPassThroughOptionType = AccordionContentPassThroughAttributes | ((options: AccordionContentPassThroughMethodOptions) => AccordionContentPassThroughAttributes | string) | string | null | undefined; @@ -80,7 +80,7 @@ export interface AccordionContentProps { * Use to change the HTML tag of root element. * @defaultValue DIV */ - 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/accordioncontent/BaseAccordionContent.vue b/packages/primevue/src/accordioncontent/BaseAccordionContent.vue index 23d75e7c5..0208b99b0 100644 --- a/packages/primevue/src/accordioncontent/BaseAccordionContent.vue +++ b/packages/primevue/src/accordioncontent/BaseAccordionContent.vue @@ -7,7 +7,7 @@ export default { extends: BaseComponent, props: { as: { - type: String, + type: [String, Object], default: 'DIV' }, asChild: { diff --git a/packages/primevue/src/accordionheader/AccordionHeader.d.ts b/packages/primevue/src/accordionheader/AccordionHeader.d.ts index f8e6089c6..cb5ed1535 100755 --- a/packages/primevue/src/accordionheader/AccordionHeader.d.ts +++ b/packages/primevue/src/accordionheader/AccordionHeader.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 AccordionHeaderPassThroughOptionType = AccordionHeaderPassThroughAttributes | ((options: AccordionHeaderPassThroughMethodOptions) => AccordionHeaderPassThroughAttributes | string) | string | null | undefined; @@ -76,7 +76,7 @@ export interface AccordionHeaderProps { * 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/accordionheader/BaseAccordionHeader.vue b/packages/primevue/src/accordionheader/BaseAccordionHeader.vue index d21a147cd..7fe885b17 100644 --- a/packages/primevue/src/accordionheader/BaseAccordionHeader.vue +++ b/packages/primevue/src/accordionheader/BaseAccordionHeader.vue @@ -7,7 +7,7 @@ export default { extends: BaseComponent, props: { as: { - type: String, + type: [String, Object], default: 'BUTTON' }, asChild: { diff --git a/packages/primevue/src/accordionpanel/AccordionPanel.d.ts b/packages/primevue/src/accordionpanel/AccordionPanel.d.ts index d92d320f7..5cb2953b1 100755 --- a/packages/primevue/src/accordionpanel/AccordionPanel.d.ts +++ b/packages/primevue/src/accordionpanel/AccordionPanel.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 AccordionPanelPassThroughOptionType = AccordionPanelPassThroughAttributes | ((options: AccordionPanelPassThroughMethodOptions) => AccordionPanelPassThroughAttributes | string) | string | null | undefined; @@ -81,7 +81,7 @@ export interface AccordionPanelProps { * Use to change the HTML tag of root element. * @defaultValue DIV */ - 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/accordionpanel/BaseAccordionPanel.vue b/packages/primevue/src/accordionpanel/BaseAccordionPanel.vue index eea329df2..001817c9b 100644 --- a/packages/primevue/src/accordionpanel/BaseAccordionPanel.vue +++ b/packages/primevue/src/accordionpanel/BaseAccordionPanel.vue @@ -15,7 +15,7 @@ export default { default: false }, as: { - type: String, + type: [String, Object], default: 'DIV' }, asChild: {