Skip to content

Commit

Permalink
#531 - Tooltip - Possibility to set display method for tooltip wrapper (
Browse files Browse the repository at this point in the history
#739)

possibility to set display method for tooltip wrapper
  • Loading branch information
marcinsawicki authored Aug 28, 2023
1 parent 4793f79 commit c22ed7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ $base-class: 'tooltip';
outline: none;
}

&__wrapper {
display: inherit;
}

&__interactive,
&__user-guide-step {
padding: var(--spacing-1);
Expand Down
8 changes: 7 additions & 1 deletion packages/react-components/src/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { FloatingComponent } from './components/FloatingComponent';
import { sleep } from './helpers';
import { ITooltipProps } from './types';

import styles from './Tooltip.module.scss';

const baseClass = 'tooltip';

export const Tooltip: React.FC<ITooltipProps> = (props) => {
Expand Down Expand Up @@ -153,7 +155,11 @@ export const Tooltip: React.FC<ITooltipProps> = (props) => {

return (
<>
<div ref={floatingOptions.reference} {...referenceOptions()}>
<div
className={styles[`${baseClass}__wrapper`]}
ref={floatingOptions.reference}
{...referenceOptions()}
>
{triggerRenderer()}
</div>
{floatingComponent}
Expand Down

0 comments on commit c22ed7a

Please sign in to comment.