Skip to content

Commit

Permalink
feat(Tag): QUV-940 tooltip prop in Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
soslayando committed May 10, 2023
1 parent 1d4ee01 commit 60ba85b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/core/src/components/Tag/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const Tag: React.FC<TagProps> = ({
wide,
size = 'md',
text,
tooltip,
...restNativeProps
}) => {
return (
Expand All @@ -45,6 +46,7 @@ export const Tag: React.FC<TagProps> = ({
quiet={quiet}
wide={wide}
size={size}
title={tooltip}
>
{quiet && (
<StyledTagBadge
Expand Down
3 changes: 3 additions & 0 deletions packages/core/src/declarations/htmlAttrs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ import type { AllHTMLAttributes } from 'react';
export interface GlobalAttrProps<T = Element> {
/** A unique identifier for the element */
id?: AllHTMLAttributes<T>['id'];
// TODO: We have to use 'tooltip' instead of 'title', so once this name is not used, we have to remove this prop
/** A title or description of the element, typically displayed as a tooltip when hovering over the element */
title?: AllHTMLAttributes<T>['title'];
/** A title or description of the element, typically displayed as a tooltip when hovering over the element */
tooltip?: AllHTMLAttributes<T>['title'];
/** Defines the role of an element in the context of the document, such as "button" or "navigation" */
role?: AllHTMLAttributes<T>['role'];
}
Expand Down

0 comments on commit 60ba85b

Please sign in to comment.