Skip to content

Commit

Permalink
cleanup (deephaven#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmingles committed Apr 19, 2024
1 parent 9760a2d commit bb6fbae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/components/src/spectrum/ItemTooltip.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* This will not work in Tooltips where there isn't a wrapping ListViewItem, so
* we copy the necessary styles.
*/
.dh-item-tooltip-description {
.dh-item-tooltip-text-description {
color: var(--item-tooltip-description-color);
font-size: var(--item-tooltip-description-font-size);
}
22 changes: 11 additions & 11 deletions packages/components/src/spectrum/ItemTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ export function ItemTooltip({
isElementOfType(node, Text)
);

const textElementsWithCssClass = Children.map(textElements, textEl =>
cloneElement(textEl, {
...textEl.props,
UNSAFE_className: cl(
textEl.props.UNSAFE_className,
`dh-item-tooltip-text-${textEl.props.slot ?? 'label'}`
),
})
);

return (
<Tooltip popperClassName="dh-item-tooltip" options={options}>
<Flex direction="column" alignItems="start">
{Children.map(textElements, textEl =>
textEl.props.slot === 'description'
? cloneElement(textEl, {
...textEl.props,
UNSAFE_className: cl(
textEl.props.UNSAFE_className,
'dh-item-tooltip-description'
),
})
: textEl
)}
{textElementsWithCssClass}
</Flex>
</Tooltip>
);
Expand Down

0 comments on commit bb6fbae

Please sign in to comment.