diff --git a/packages/ui/components/button/button.stories.mdx b/packages/ui/components/button/button.stories.mdx
index c4cafd4e95..4ee81d5b30 100644
--- a/packages/ui/components/button/button.stories.mdx
+++ b/packages/ui/components/button/button.stories.mdx
@@ -1,3 +1,4 @@
+import { TooltipProvider } from "@radix-ui/react-tooltip";
import { Canvas, Meta, Story, ArgsTable } from "@storybook/addon-docs";
import {
@@ -17,7 +18,7 @@ import { Button } from "./Button";
-
+
## Definition
@@ -170,6 +171,15 @@ Button are clickable elements that initiates user actions. Labels in the button
{
+ const darkVariantContainer = canvasElement.querySelector('[data-mode="dark"]');
+ const buttonElement = darkVariantContainer.querySelector("button");
+ buttonElement?.addEventListener("mouseover", () => {
+ setTimeout(() => {
+ document.querySelector('[data-testid="tooltip"]').classList.add("dark");
+ }, 55);
+ });
+ }}
args={{
color: "primary",
size: "base",
@@ -177,6 +187,7 @@ Button are clickable elements that initiates user actions. Labels in the button
disabled: false,
children: "Button text",
className: "",
+ tooltip: "tooltip",
}}
argTypes={{
color: {
@@ -212,19 +223,20 @@ Button are clickable elements that initiates user actions. Labels in the button
options: ["", "sb-pseudo--hover", "sb-pseudo--focus"],
},
},
+ tooltip: {
+ control: {
+ type: "text",
+ },
+ },
}}>
- {({ color, size, loading, disabled, children, className }) => (
+ {({ children, ...args }) => (
-
+
+
+
)}