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

On-demand store: argTypes no longer compatible with storiesOf #16756

Closed
shilman opened this issue Nov 22, 2021 · 1 comment
Closed

On-demand store: argTypes no longer compatible with storiesOf #16756

shilman opened this issue Nov 22, 2021 · 1 comment

Comments

@shilman
Copy link
Member

shilman commented Nov 22, 2021

This is a pattern we recommended in the past for using storiesOf with ArgsTable etc.

import { storiesOf } from '@storybook/react';
import { Button } from './button';
import React from 'react';

storiesOf('Example/Button', module).add(
  'with text',
  (args: any) => <Button {...args}/>,
  {
    component: Button, // This would tell it what component for auto-generated controls.
    args: {
      label: 'With Args'
    },
    argTypes: {
      label: { type: 'string' }
    }
  }
);

According to this update, this no longer works in 6.4 https://discord.com/channels/486522875931656193/501692020226654208/912394654572482591

@shilman
Copy link
Member Author

shilman commented Nov 26, 2021

Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-rc.10 containing PR #16791 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Nov 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant