Skip to content

Commit

Permalink
Add size 12 ui coverage icon & add classname for tooltip popper (#519)
Browse files Browse the repository at this point in the history
* add classname for tooltip popper container

* add size 12 cypress icon

* add changeset

* remove icon and update changeset
  • Loading branch information
mabela416 authored Jan 7, 2025
1 parent 3658224 commit 748fb55
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/lovely-emus-change.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@cypress-design/react-tooltip': patch
---

Allow tooltip popper to receive a classname
6 changes: 6 additions & 0 deletions components/Tooltip/react/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ export interface TooltipProps {
* The content of the tooltip.
*/
popper?: React.ReactNode
/**
* classname for the popper container
*/
popperClassName?: string
/**
* Disable the tooltip.
* This hides the popper and makes the tooltip inactive.
Expand Down Expand Up @@ -65,6 +69,7 @@ export const Tooltip: React.FC<
placement,
color = 'light',
className,
popperClassName,
children,
popper,
disabled,
Expand Down Expand Up @@ -180,6 +185,7 @@ export const Tooltip: React.FC<
ref={refs.setFloating}
style={{ ...floatingStyles, zIndex: 100 }}
role="tooltip"
className={popperClassName}
{...getFloatingProps()}
>
<div
Expand Down

0 comments on commit 748fb55

Please sign in to comment.