From e5eb3aeb6d0bc9fd8c00b2d037b184884ef82b39 Mon Sep 17 00:00:00 2001 From: Roberto Hernandez Date: Wed, 11 Sep 2024 14:54:17 -0600 Subject: [PATCH] feat: update preview.js with 'overrideParams' for customization --- .storybook/preview.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.storybook/preview.js b/.storybook/preview.js index 7f8f42d..9b6db2a 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -1,9 +1,7 @@ import { useEffect } from '@storybook/preview-api'; import Twig from 'twig'; import { setupTwig } from './setupTwig'; - -// Project config to import stylesheets. -import('../../../../config/emulsify-core/storybook/preview'); +import { overrideParams } from '../../../../config/emulsify-core/storybook/preview'; // If in a Drupal project, it's recommended to import a symlinked version of drupal.js. import './_drupal.js'; @@ -22,6 +20,9 @@ export const decorators = [ setupTwig(Twig); +const safeParamOverrides = overrideParams || {}; + export const parameters = { actions: { argTypesRegex: '^on[A-Z].*' }, + ...safeParamOverrides, };