storybook icon indicating copy to clipboard operation
storybook copied to clipboard

ArgTypes configuration for array of objects

Open alexandermirzoyan opened this issue 2 years ago • 1 comments

Discussed in https://github.com/storybookjs/storybook/discussions/18680

Originally posted by alexandermirzoyan July 11, 2022 Hi all, I have a web component which accepts an array of objects with a custom scheme. Is there any way how can I configure the pattern. I want that icon property would accept only a select control.

Current config that I use.

argTypes: {
    options: {
      control: { type: 'array' },
      title: { control: 'text' },
      icon: { control: 'select', options: ICONS },
      action: { control: 'text' },
      link: { control: 'text' },
    },
  },

image

alexandermirzoyan avatar Jul 11 '22 14:07 alexandermirzoyan

This is currently not yet possible.

Do you have an idea on how this could be implemented? We'd welcome a PR adding this option.

ndelangen avatar Jan 17 '23 20:01 ndelangen

Any progress on this? Maybe, I'm lucky and it is supported in V8.

mcrodriguezb avatar Mar 22 '24 13:03 mcrodriguezb

Any progress on this? Maybe, I'm lucky and it is supported in V8.

Wow, that's cool 🎉 So if it is working in v8 I guess we can close this issue.

alexandermirzoyan avatar Mar 22 '24 14:03 alexandermirzoyan