Repository: equinor/design-system (ts)

Issue:
Tooltip: Add classname for easier styling
A couple of places, such as Sidebar, have built in tooltips that are not easily targetable for styling. Adding `eds-tooltip` classname directly on the component should fix this

Pull request:
🧑‍💻Tooltip: added "eds-tooltip" class
resolves #3699 

Patch:
diff --git a/packages/eds-core-react/src/components/Tooltip/Tooltip.docs.mdx b/packages/eds-core-react/src/components/Tooltip/Tooltip.docs.mdx
index be1ca452..c8eb7edc 100644
--- a/packages/eds-core-react/src/components/Tooltip/Tooltip.docs.mdx
+++ b/packages/eds-core-react/src/components/Tooltip/Tooltip.docs.mdx
@@ -42,6 +42,9 @@ import { Tooltip } from '@equinor/eds-core-react'
 
 Keep in mind that if `Tooltip` is added to a non-focusable element, it is inaccessible to people dependent on keyboard navigation and assistive technologies.
 
+## Styling
+`Tooltip` have the classname `eds-tooltip` to make it easier to style the component globally, including tooltips built into other eds components such as `Sidebar`. Individual tooltips can otherwise be styled with `style`, `className` or `styled(Tooltip)`
+
 
 ## Examples
 
diff --git a/packages/eds-core-react/src/components/Tooltip/Tooltip.tsx b/packages/eds-core-react/src/components/Tooltip/Tooltip.tsx
index 0433e74c..848e7dcf 100644
--- a/packages/eds-core-react/src/components/Tooltip/Tooltip.tsx
+++ b/packages/eds-core-react/src/components/Tooltip/Tooltip.tsx
@@ -202,6 +202,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
         {...rest}
         {...getFloatingProps({
           ref: tooltipRef,
+          className: `eds-tooltip ${rest.className ?? ''}`,
           style: {
             ...style,
             position: strategy,


Test patch:
diff --git a/packages/eds-core-react/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap b/packages/eds-core-react/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap
index dc4591c6..1c5f0ce7 100644
--- a/packages/eds-core-react/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap
+++ b/packages/eds-core-react/src/components/Tooltip/__snapshots__/Tooltip.test.tsx.snap
@@ -51,7 +51,7 @@ exports[`Tooltip Matches snapshot 1`] = `
 }
 
 <div
-  class="c0"
+  class="c0 eds-tooltip "
   id=":r0:"
   popover="manual"
   role="tooltip"