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

Dedent Source Blocks in <Canvas /> elements #104

Open
ms2d opened this issue May 19, 2024 · 1 comment
Open

Dedent Source Blocks in <Canvas /> elements #104

ms2d opened this issue May 19, 2024 · 1 comment

Comments

@ms2d
Copy link

ms2d commented May 19, 2024

How can we dedent the source code for <Canvas /> elements, when using this plugin?

dedent-vue-canvas-source
@ms2d
Copy link
Author

ms2d commented Oct 24, 2024

Looks like adding docs with format set to dedent does the trick:

/** @type { import('@storybook/vue3').Preview } */
import '../src/style.css';
const preview = {
  parameters: {
    actions: { argTypesRegex: '^on[A-Z].*' },
    controls: {
      matchers: {
        color: /(background|color)$/i,
        date: /Date$/i,
      },
    },
    docs: {
      source: {
        format: 'dedent',
      },
    },
  },
};

export default preview;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant