From fa4d3404923747ca7416e96342d340fc97c970b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Pot=C4=99pa?= Date: Mon, 11 Sep 2023 12:12:09 +0200 Subject: [PATCH] fix(storybook): path to brand logo TET-138 --- .storybook/lightTheme.ts | 4 +++- .storybook/main.ts | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.storybook/lightTheme.ts b/.storybook/lightTheme.ts index 4f121f7d..88d39dd2 100644 --- a/.storybook/lightTheme.ts +++ b/.storybook/lightTheme.ts @@ -1,5 +1,7 @@ import { create } from '@storybook/theming/create'; +const REPOSITORY_NAME = process?.env?.REPOSITORY_NAME; + export default create({ base: 'light', colorPrimary: '#272E35', @@ -10,7 +12,7 @@ export default create({ // Branding brandTitle: 'Tetrisly - React Components', - brandImage: '/logo.svg', + brandImage: `${REPOSITORY_NAME ? '/' + REPOSITORY_NAME : ''}/logo.svg`, // UI appBg: '#ffffff', diff --git a/.storybook/main.ts b/.storybook/main.ts index 7ae77431..78cde339 100644 --- a/.storybook/main.ts +++ b/.storybook/main.ts @@ -19,10 +19,11 @@ const config: StorybookConfig = { autodocs: 'tag', }, core: {}, - async viteFinal(config) { + async viteFinal(config, { configType }) { if (!config.plugins) { config.plugins = []; } + config.plugins.push(tsconfigPaths.default()); return config;