Skip to content

Commit 8610e4e

Browse files
committed
refactor(tooltip provider): move tooltip provider to the preview file so it can be a root parent for all stories
1 parent 06b59f3 commit 8610e4e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.storybook/preview.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { MotionGlobalConfig } from "framer-motion"
33
import type { Preview } from "@storybook/react"
44

55
import ThemeProvider from "@/components/ThemeProvider"
6+
import { TooltipProvider } from "@/components/ui/tooltip"
67

78
import i18n, { baseLocales } from "./i18next"
89
import { withNextThemes } from "./withNextThemes"
@@ -39,7 +40,9 @@ const preview: Preview = {
3940
}),
4041
(Story) => (
4142
<ThemeProvider>
42-
<Story />
43+
<TooltipProvider>
44+
<Story />
45+
</TooltipProvider>
4346
</ThemeProvider>
4447
),
4548
],

src/components/BannerGrid/BannerGrid.stories.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { getTranslation } from "@/storybook-utils"
1111

1212
import { langViewportModes } from "../../../.storybook/modes"
1313
import { ContentContainer } from "../MdComponents"
14-
import { TooltipProvider } from "../ui/tooltip"
1514

1615
import {
1716
Banner as BannerComponent,
@@ -38,9 +37,7 @@ const meta = {
3837
(Story) => (
3938
<div className="relative w-full">
4039
<ContentContainer>
41-
<TooltipProvider>
42-
<Story />
43-
</TooltipProvider>
40+
<Story />
4441
</ContentContainer>
4542
</div>
4643
),

0 commit comments

Comments
 (0)