break-stuff / wc-storybook-helpers

Helpers designed to make integrating Web Components with Storybook easier.
MIT License
52 stars 9 forks source link

Incompatible with Storybook 8.0.6 #70

Closed dgibson666 closed 4 months ago

dgibson666 commented 6 months ago

After upgrading Storybook to the latest v8.06, I get the following warnings in the CLI:

WARN The following packages are incompatible with Storybook 8.0.6 as they depend on different major versions of Storybook packages: WARN - wc-storybook-helpers@2.0.1 WARN Repo: https://github.com/break-stuff/wc-storybook-helpers#readme

CollinHerber commented 5 months ago

I am also experiencing this on 8.0.8

break-stuff commented 5 months ago

Thank you for letting me know! This is likely because we also support v7 APIs, but we should be able to fix this.

break-stuff commented 4 months ago

This should now be fixed in release 2.0.2

break-stuff commented 4 months ago

Closing for now. Let me know if you run into any issues.

CollinHerber commented 4 months ago

Screenshot 2024-05-21 at 2 36 46 PM

Got around to trying out the latest but getting the following

Here is my full story

import { Meta, StoryObj } from '@storybook/web-components';
import './scoped-notification.slds';
import { NjcSldsScopedNotification } from './scoped-notification.slds';
import { getWcStorybookHelpers } from 'wc-storybook-helpers';
const { events, args, argTypes, template } =
    getWcStorybookHelpers('nsc-scoped-notification');

const meta: Meta<NjcSldsScopedNotification> = {
    title: 'Components/ScopedNotification/Slds',
    component: 'nsc-scoped-notification',
    args,
    argTypes,
    parameters: {
        actions: {
            handles: events,
        },
    },
};
export default meta;

type Story = StoryObj<NjcSldsScopedNotification & {slotContent: string}>;
export const Example: Story = {
    render: (args) => template(args),
    args: {
        slotContent: 'Slot',
        theme: 'success',
    },
};
break-stuff commented 4 months ago

Make sure you are using the @tag or @tagName jsDoc tag in your component.