1
1
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:
2024-10-12 23:51:58 +02:00
parent 12f1d6cdf2
commit 0a7094005c
36 changed files with 2797 additions and 2709 deletions

View File

@@ -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",

View File

@@ -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>