Skip to content

Commit

Permalink
RHCLOUD-29659 add badge tooltip (#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyperkid123 authored Dec 8, 2023
1 parent face54f commit 7f94d46
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Components/AstroAvatar/AstroBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, ButtonVariant } from '@patternfly/react-core';
import { Button, ButtonVariant, Tooltip } from '@patternfly/react-core';

Check warning on line 2 in src/Components/AstroAvatar/AstroBadge.tsx

View workflow job for this annotation

GitHub Actions / build

'ButtonVariant' is defined but never used
import BubbleIcon from '../../assets/badge-icon.svg';

interface AstroAvatarProps {
Expand All @@ -8,8 +8,10 @@ interface AstroAvatarProps {

export const AstroBadge: React.FunctionComponent<AstroAvatarProps> = ({ onClick }) => {
return (
<Button className="astro-c-button-badge pf-v5-u-box-shadow-lg" onClick={onClick}>
<img className="astro__badge" src={BubbleIcon} alt="Launch virtual assistant" />
</Button>
<Tooltip position="left" content={<div>Virtual assistant</div>}>
<Button className="astro-c-button-badge pf-v5-u-box-shadow-lg" onClick={onClick}>
<img className="astro__badge" src={BubbleIcon} alt="Launch virtual assistant" />
</Button>
</Tooltip>
);
};

0 comments on commit 7f94d46

Please sign in to comment.