Custom control components #33519
scriptcoded
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem? Please describe.
We use Storybook for documenting bespoke components that are used for very niche products at IKEA, and these components usually take very specific input data. We'd like to make it to mock this data in Storybook, and would therefore like to be able to build custom controls for these. Unfortunately there is no way to hook into the args table in Storybook.
Describe the solution you'd like
Extend the
ArgControlcomponent to also allow a React component to be passed in as control type, and render that instead. I believe this could be done right here in code, with some changes to the types as well, of course:storybook/code/addons/docs/src/blocks/components/ArgsTable/ArgControl.tsx
Line 88 in 5111c16
If you believe this is a resonable approach, I have some time left over in the coming weeks that I could probably use to implement this feature.
Describe alternatives you've considered
We could also implement a global way of registering components and using them, but it sounds like that would add a lot of extra complexity.
Are you able to assist to bring the feature to reality?
yes, I can
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions