Open lewisd1996 opened 1 year ago
@lewisd1996 thanks for bringing this to my attention, I will look into it. Sorry for the delay in responding I've been very busy.
@lewisd1996 thanks for bringing this to my attention, I will look into it. Sorry for the delay in responding I've been very busy.
No problem Danny, thank you for all your work in creating/maintaining this great tool, it really is super useful
it seems like disabling a control can be done with parameters like this:
parameters:{
controls:{
exclude:/pauses/g
}
}
@dannyhw's suggestion above ⬆️ worked for me!
For the value of exclude
, you can either use regex (as @dannyhw did in the example) or use an array of strings, each representing an argument to exclude from the Controls panel. You can refer to "Filtering controls" section of this official documentation page for more info.
const meta: Meta<typeof MyComponent> = {
title: "MyComponent",
component: MyComponent,
parameters: {
controls: {
exclude: ["foo", "bar"],
},
},
};
export default meta;
type Story = StoryObj<typeof MyComponent>;
export const Default: Story = {
args: {
foo: someComplexObject,
bar: someComplexArray,
},
};
Describe the bug I've seen suggestions floating around on the web that the following arg types should result in removing controls from the storybook ui:
Is there an actual way to remove these from the controls list? In my case, these fields are huge arrays and displaying them makes scrolling to other controls extremely difficult.
To Reproduce Steps to reproduce the behavior:
false
addons
->controls
Expected behavior The controls with a value of
false
should not appear in the controls ui list.Additional context Installed packages: