Merge pull request #7078 from J-Michalek/patch-2

feat(button): add a11yAttrs to slot types
pull/7007/merge
Tuğçe Küçükoğlu 2025-01-13 10:12:35 +03:00 committed by GitHub
commit 19cc3b4fb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -227,7 +227,13 @@ export interface ButtonSlots {
/** /**
* 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. * 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.
*/ */
default(): VNode[]; default(scope: {
/**
* Object containing the accessibility attributes.
* @remarks Only available when {@link ButtonProps.asChild} is set to true.
*/
a11yAttrs?: Record<string, unknown>
}): VNode[];
/** /**
* Custom icon template. * Custom icon template.
* @param {Object} scope - icon slot's params. * @param {Object} scope - icon slot's params.