Skip to content

Commit

Permalink
[OSCI][BUG] Fixing bug in icon-only buttons for showing info tooltip …
Browse files Browse the repository at this point in the history
…when hovered (opensearch-project#1160)

* fixing bug in icon-only buttons for showing info tooltip

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* Updating test snapshoots related to change in button_content.tsx

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* Updating chanelog.md regarding update in OuiButtonContent

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* updating button_content.tsx using recomendation of mantainer (include undefined in className instead of empty string)

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* updating test snapshoots for button_content.tsx

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* adding title prop to OuiIcon component, removing wrapping span element in buttonIcon and updating snapshots

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

* refactoring code for buttonIcon variable to keep more concise definition

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>

---------

Signed-off-by: Samuel Valdes Gutierrez <[email protected]>
  • Loading branch information
BigSamu authored Jan 11, 2024
1 parent 064a02c commit 96af93e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
- Extract build archive into a folder for OSD integration test CI ([#1075](https://github.com/opensearch-project/oui/pull/1075))
- Correct file path for import of Query component ([#1069](https://github.com/opensearch-project/oui/pull/1069))
- Fix "Guidelines" documentation links rendering blank pages ([#1111](https://github.com/opensearch-project/oui/pull/1111))
- Fix bug in OuiButtonContent for showing info tooltip in icon-only buttons when hovered([#1160](https://github.com/opensearch-project/oui/pull/1160))
- Fix playground support check ([#1162](https://github.com/opensearch-project/oui/pull/1162))

### 🚞 Infrastructure
Expand Down
1 change: 1 addition & 0 deletions src/components/button/button_content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
/>
);
Expand Down

0 comments on commit 96af93e

Please sign in to comment.