Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMULSIF-335: Project preview.js params #52

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { useEffect } from '@storybook/preview-api';
import Twig from 'twig';
import { setupTwig, fetchCSSFiles } from './utils.js';
import Twig from "twig";
import { useEffect } from "@storybook/preview-api";
import { setupTwig, fetchCSSFiles } from "./utils.js";
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';
import "./_drupal.js";

export const decorators = [
(Story, { args }) => {
Expand All @@ -20,6 +21,9 @@ export const decorators = [
setupTwig(Twig);
fetchCSSFiles();

const safeParamOverrides = overrideParams || {};

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
actions: { argTypesRegex: "^on[A-Z].*" },
...safeParamOverrides,
};
Loading