This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
wikipedia-game-solver/apps/storybook/.storybook/preview.tsx
Théo LUDWIG 3ae6d2fac3
Some checks failed
Chromatic / chromatic (push) Failing after 42s
CI / ci (push) Successful in 2m44s
CI / commitlint (push) Successful in 14s
chore: initial commit
2024-07-24 12:35:33 +02:00

51 lines
1.2 KiB
TypeScript

import "@repo/config-tailwind/styles.css"
import { defaultTranslationValues } from "@repo/i18n/config"
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
import { ThemeProvider } from "@repo/ui/Header/SwitchTheme"
import type { Preview } from "@storybook/react"
import { NextIntlClientProvider } from "next-intl"
import React from "react"
const preview: Preview = {
parameters: {
nextjs: {
appDirectory: true,
},
options: {
storySort: {
order: ["Design System", "User Interface", "Feature"],
},
},
backgrounds: { disable: true },
darkMode: {
darkClass: "dark",
lightClass: "light",
classTarget: "html",
stylePreview: true,
},
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
},
decorators: [
(Story) => {
return (
<ThemeProvider>
<NextIntlClientProvider
messages={i18nMessagesEnglish}
locale="en"
defaultTranslationValues={defaultTranslationValues}
>
<Story />
</NextIntlClientProvider>
</ThemeProvider>
)
},
],
}
export default preview