From f01bdf2de775c2b7e7cd9141441590f80db77fcf Mon Sep 17 00:00:00 2001 From: Vivian Phung Date: Thu, 16 May 2024 20:42:29 -0400 Subject: [PATCH] [2/n][Storybook] Settings - EnvironmentVariables (#75) --- .../Settings/AddEnvironmentVariableRow.stories.tsx | 4 ++-- .../Settings/DisplayEnvironmentVariables.stories.tsx | 9 +++++++++ packages/frontend/vite.config.ts | 4 ++-- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx b/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx index 20fef69d..458bfa70 100644 --- a/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx +++ b/packages/frontend/src/stories/Project/Settings/AddEnvironmentVariableRow.stories.tsx @@ -29,10 +29,10 @@ const meta: Meta = { action: 'register', }, index: { - type: 'number', + type: 'number', }, isDeleteDisabled: { - type: 'boolean', + type: 'boolean', }, }, args: { diff --git a/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx b/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx index 3548a35b..a3ccc0a8 100644 --- a/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx +++ b/packages/frontend/src/stories/Project/Settings/DisplayEnvironmentVariables.stories.tsx @@ -1,6 +1,11 @@ import { Meta, StoryObj } from '@storybook/react'; import DisplayEnvironmentVariables from 'components/projects/project/settings/DisplayEnvironmentVariables'; +import { + environmentVariable0, + environmentVariable1, +} from '../../MockStoriesData'; +import { Environment } from 'gql-client'; const meta: Meta = { title: 'Project/Settings/DisplayEnvironmentVariables', @@ -20,6 +25,10 @@ const meta: Meta = { action: 'update', }, }, + args: { + environment: Environment.Development, + variables: [environmentVariable0, environmentVariable1], + }, }; export default meta; diff --git a/packages/frontend/vite.config.ts b/packages/frontend/vite.config.ts index d9bb608b..e40bea3b 100644 --- a/packages/frontend/vite.config.ts +++ b/packages/frontend/vite.config.ts @@ -1,9 +1,9 @@ -import { defineConfig } from 'vite'; +import { defineConfig, PluginOption } from 'vite'; import react from '@vitejs/plugin-react'; // https://vitejs.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react()] as PluginOption[], resolve: { alias: { utils: '/src/utils',