mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
chore: config updates
This commit is contained in:
@@ -7,7 +7,11 @@ const config: StorybookConfig = {
|
||||
docs: {
|
||||
defaultName: "Documentation",
|
||||
},
|
||||
stories: ["../../../packages/**/*.stories.tsx", "../stories/*.mdx"],
|
||||
stories: [
|
||||
"../../../packages/ui/src/**/*.stories.tsx",
|
||||
"../../../packages/blog/src/**/*.stories.tsx",
|
||||
"../stories/*.mdx",
|
||||
],
|
||||
addons: [
|
||||
"@storybook/addon-essentials",
|
||||
"@storybook/addon-storysource",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import "@repo/config-tailwind/styles.css"
|
||||
import { defaultTranslationValues } from "@repo/i18n/config"
|
||||
import i18nMessagesEnglish from "@repo/i18n/translations/en-US.json"
|
||||
import type { Locale } from "@repo/utils/constants"
|
||||
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||
import type { Preview } from "@storybook/react"
|
||||
import { NextIntlClientProvider } from "next-intl"
|
||||
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
||||
@@ -25,6 +25,7 @@ const preview: Preview = {
|
||||
stylePreview: true,
|
||||
},
|
||||
controls: {
|
||||
disableSaveFromUI: true,
|
||||
matchers: {
|
||||
color: /(background|color)$/i,
|
||||
date: /Date$/i,
|
||||
@@ -33,14 +34,13 @@ const preview: Preview = {
|
||||
},
|
||||
decorators: [
|
||||
(Story) => {
|
||||
const locale = "en-US" satisfies Locale
|
||||
|
||||
return (
|
||||
<NextThemeProvider enableColorScheme={false}>
|
||||
<NextIntlClientProvider
|
||||
messages={i18nMessagesEnglish}
|
||||
locale={locale}
|
||||
locale={LOCALE_DEFAULT}
|
||||
defaultTranslationValues={defaultTranslationValues}
|
||||
timeZone={process.env["TZ"] ?? "UTC"}
|
||||
>
|
||||
<Story />
|
||||
</NextIntlClientProvider>
|
||||
|
Reference in New Issue
Block a user