Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2799 from teamleadercrm/bugfix-tooltip-teamleader…
Browse files Browse the repository at this point in the history
…-tag

Add back the data-teamleader-ui attribute on the Tooltip
  • Loading branch information
lowiebenoot authored Nov 3, 2023
2 parents 53dc09d + 680414b commit dcd456a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@

- `Tooltip`: removed `horizontal` and `vertical` positions from the `tooltipPosition` options. Tooltips will still render to the opposite side in case there is not enough space on the chosen position. ([@lowiebenoot](https://github.com/lowiebenoot)) in [#2796](https://github.com/teamleadercrm/ui/pull/2796)`

## [23.0.1] - 2023-10-30

### Fixed

- `Tooltip`: added missing `data-teamleader-ui="tooltip"` attribute ([@lowiebenoot](https://github.com/lowiebenoot)) in [#2799](https://github.com/teamleadercrm/ui/pull/2799)`

## [22.3.5] - 2023-10-18

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@teamleader/ui",
"description": "Teamleader UI library",
"version": "23.0.0",
"version": "23.0.1",
"author": "Teamleader <[email protected]>",
"bugs": {
"url": "https://github.com/teamleadercrm/ui/issues"
Expand Down
13 changes: 8 additions & 5 deletions src/components/tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import uiUtilities from '@teamleader/ui-utilities';
import cx from 'classnames';
import * as RadixTooltip from '@radix-ui/react-tooltip';
import omit from 'lodash.omit';
import React, { MouseEventHandler, ReactNode, useEffect, useRef, useState } from 'react';
import { GenericComponent } from '../../@types/types';

import { COLORS, SIZES } from '../../constants';
import React, { MouseEventHandler, ReactNode, useEffect, useRef, useState } from 'react';

import Box from '../box';
import { BoxProps } from '../box/Box';
import { GenericComponent } from '../../@types/types';
import cx from 'classnames';
import omit from 'lodash.omit';
import theme from './theme.css';
import uiUtilities from '@teamleader/ui-utilities';

type Position = 'bottom' | 'left' | 'right' | 'top';

Expand Down Expand Up @@ -175,6 +177,7 @@ const TooltippedComponent: GenericComponent<TooltippedComponentProps> = ({
sideOffset={8}
side={tooltipPosition}
style={{ zIndex }}
data-teamleader-ui="tooltip"
>
<Box className={theme['inner']} {...SIZE_MAP[tooltipSize]}>
{tooltipIcon && <div className={theme['icon']}>{tooltipIcon}</div>}
Expand Down

0 comments on commit dcd456a

Please sign in to comment.