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

Angular, withKnobs, and css changes #2982

Closed
vidarc opened this issue Feb 14, 2018 · 1 comment
Closed

Angular, withKnobs, and css changes #2982

vidarc opened this issue Feb 14, 2018 · 1 comment

Comments

@vidarc
Copy link

vidarc commented Feb 14, 2018

Issue details

The addon, storybook/addon-knobs, doesn't appear to update dynamically when using directives.

The URL gets updated correctly. It just doesn't get applied to the component's directive. I tried both versions of the select knob, and neither worked. The default value gets applied correctly.

Please specify which version of Storybook and optionally any affected addons that you're running

  • storybook/addon-actions: ^3.4.0-alpha.8,
  • storybook/addon-knobs: ^3.4.0-alpha.8,
  • storybook/addon-links: ^3.4.0-alpha.8,
  • storybook/addon-notes: ^3.4.0-alpha.8,
  • storybook/addons: ^3.4.0-alpha.8,
  • storybook/angular: ^3.4.0-alpha.8,

Screenshots / Screencast / Code Snippets (Optional)

const colors = ['active', 'progressive', 'regressive', 'destructive'];

storiesOf('Button', module)
  .addDecorator(withKnobs)
  .add('Active Button', () => {
    const color = selectV2('color', colors, 'active');

    return {
      moduleMetadata: {
        imports: [AgButtonModule]
      },
      template: `<button ag-button [color]="color">Active Button</button>`,
      props: {
        color
      }
    };
  })
  .add('Disabled Button', () => {
    const color = select('color', colors, 'active');

    return {
      moduleMetadata: {
        imports: [AgButtonModule]
      },
      template: `<button ag-button [color]="color" disabled>Disabled Button</button>`,
      props: {
        color
      }
    };
  });
@vidarc vidarc changed the title Angular, withKnobs, and directives Angular, withKnobs, and css changes Feb 14, 2018
@vidarc
Copy link
Author

vidarc commented Feb 14, 2018

closing. different issue (my own)

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