AI-native design editor. Open-source Figma alternative.
fix(storybook): synchronize chat light theme
Danila Poyarkov039c810f5c7c
diff --git a/.storybook/preview.ts b/.storybook/preview.tsindex ff0c7e217..c7068abc3 100644--- a/.storybook/preview.ts+++ b/.storybook/preview.ts@@ -1,5 +1,8 @@import { withThemeByDataAttribute } from '@storybook/addon-themes'import type { Preview, Renderer } from '@storybook/vue3-vite'+import { watch } from 'vue'++import { useAppTheme } from '../src/app/shell/theme'import '../src/app.css'@@ -13,8 +16,16 @@ const preview: Preview = {defaultTheme: 'dark',attributeName: 'data-theme'}),- (story) => ({+ (story, context) => ({components: { story },+ setup() {+ const { setTheme } = useAppTheme()+ watch(+ () => context.globals.theme,+ (theme) => setTheme(theme === 'light' ? 'light' : 'dark'),+ { immediate: true }+ )+ },template:'<div class="min-h-screen bg-canvas p-8 text-surface [--vp-c-bg-alt:var(--color-panel-field)] [--vp-c-bg-soft:var(--color-panel)] [--vp-c-brand-1:var(--color-component)] [--vp-c-divider:var(--color-border)] [--vp-c-text-1:var(--color-surface)] [--vp-c-text-2:var(--color-muted)]"><story /></div>'})diff --git a/src/components/chat/markdown/InlineCode.vue b/src/components/chat/markdown/InlineCode.vueindex e15ef90da..843caf9fb 100644--- a/src/components/chat/markdown/InlineCode.vue+++ b/src/components/chat/markdown/InlineCode.vue@@ -7,7 +7,7 @@ const { node: _node } = defineProps<MarkdownComponentProps>()<template><codedata-stream-markdown="inline-code"- class="rounded bg-muted px-1 py-px font-mono text-[11px] leading-4 break-words whitespace-normal"+ class="rounded bg-hover px-1 py-px font-mono text-[11px] leading-4 text-surface break-words whitespace-normal"dir="ltr"><slot />