From 0a35c090e11c614d608f7f0e30016497860680a6 Mon Sep 17 00:00:00 2001 From: "opensearch-trigger-bot[bot]" <98922864+opensearch-trigger-bot[bot]@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:53:23 -0800 Subject: [PATCH] [OSCI][BUG] Fixing bug in icon-only buttons for showing info tooltip when hovered (#1160) (#1206) * fixing bug in icon-only buttons for showing info tooltip Signed-off-by: Samuel Valdes Gutierrez * Updating test snapshoots related to change in button_content.tsx Signed-off-by: Samuel Valdes Gutierrez * Updating chanelog.md regarding update in OuiButtonContent Signed-off-by: Samuel Valdes Gutierrez * updating button_content.tsx using recomendation of mantainer (include undefined in className instead of empty string) Signed-off-by: Samuel Valdes Gutierrez * updating test snapshoots for button_content.tsx Signed-off-by: Samuel Valdes Gutierrez * adding title prop to OuiIcon component, removing wrapping span element in buttonIcon and updating snapshots Signed-off-by: Samuel Valdes Gutierrez * refactoring code for buttonIcon variable to keep more concise definition Signed-off-by: Samuel Valdes Gutierrez --------- Signed-off-by: Samuel Valdes Gutierrez (cherry picked from commit 96af93e1b7a24b9859e6628d94dc3d6ae9941a7f) Signed-off-by: github-actions[bot] # Conflicts: # CHANGELOG.md Co-authored-by: github-actions[bot] --- src/components/button/button_content.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/button/button_content.tsx b/src/components/button/button_content.tsx index 3c260aeb47..a4a5bb8a7f 100644 --- a/src/components/button/button_content.tsx +++ b/src/components/button/button_content.tsx @@ -96,6 +96,7 @@ export const OuiButtonContent: FunctionComponent< className="ouiButtonContent__icon" type={iconType} size={iconSize} + title={textProps?.title} color="inherit" // forces the icon to inherit its parent color /> );