extend Button component props

pull/6267/head
Andrew Russell 2024-08-20 21:29:12 +02:00
parent ab1a3b86b3
commit 48f1ff85b9
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ export default {
default: undefined
},
as: {
type: String,
type: [String, Object],
default: 'BUTTON'
},
asChild: {

View File

@ -10,7 +10,7 @@
import type { DefineComponent, DesignToken, EmitFn, GlobalComponentConstructor, HintedString, PassThrough } from '@primevue/core';
import type { ComponentHooks } from '@primevue/core/basecomponent';
import type { PassThroughOptions } from 'primevue/passthrough';
import { ButtonHTMLAttributes, VNode } from 'vue';
import type { ButtonHTMLAttributes, Component, VNode } from 'vue';
export declare type ButtonPassThroughOptionType<T = any> = ButtonPassThroughAttributes | ((options: ButtonPassThroughMethodOptions<T>) => ButtonPassThroughAttributes | string) | string | null | undefined;
@ -133,7 +133,7 @@ export interface ButtonProps extends ButtonHTMLAttributes {
* 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