Allow customization of tooltip capitalization (#7172)

This commit is contained in:
Nicolas Mowen
2023-07-16 06:44:05 -06:00
committed by GitHub
parent 662025a961
commit c6d0e93157
3 changed files with 7 additions and 6 deletions

View File

@@ -65,6 +65,7 @@ export default function Button({
className = '',
color = 'blue',
disabled = false,
ariaCapitalize = false,
href,
type = 'contained',
...attrs
@@ -107,7 +108,7 @@ export default function Button({
>
{children}
</Element>
{hovered && attrs['aria-label'] ? <Tooltip text={attrs['aria-label']} relativeTo={ref} /> : null}
{hovered && attrs['aria-label'] ? <Tooltip text={attrs['aria-label']} relativeTo={ref} capitalize={ariaCapitalize} /> : null}
</Fragment>
);
}