Skip to content

Commit 19cc3b4

Browse files
Merge pull request #7078 from J-Michalek/patch-2
feat(button): add a11yAttrs to slot types
2 parents 8c570ca + 725c737 commit 19cc3b4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

packages/primevue/src/button/Button.d.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,13 @@ export interface ButtonSlots {
227227
/**
228228
* Custom content such as icons, images and text can be placed inside the button via the default slot. Note that when slot is used, label, icon and badge properties are not included.
229229
*/
230-
default(): VNode[];
230+
default(scope: {
231+
/**
232+
* Object containing the accessibility attributes.
233+
* @remarks Only available when {@link ButtonProps.asChild} is set to true.
234+
*/
235+
a11yAttrs?: Record<string, unknown>
236+
}): VNode[];
231237
/**
232238
* Custom icon template.
233239
* @param {Object} scope - icon slot's params.

0 commit comments

Comments
 (0)