Skip to content

[Bug]: Stories are not overwriting {control: false} from meta (argTypes) #27091

Open
@ghost

Description

Describe the bug

I want to have an argument disabled in most of the stories for a component, but I cannot overwrite the value on meta definition in specific stories.

To Reproduce

Set in meta definition: argTypes{ whatever: {control: false} }; and then try to set argTypes{ whatever: {control: "string"} } inside a story. The control for that arg will remain disabled ("-").

Nonetheless, if you go from control:"string" in meta definition to control: "object" in story, it will overwrite it correctly.

System

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
  Binaries:
    Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
    npm: 10.5.2 - ~\Documents\GitHub\design-system\node_modules\.bin\npm.CMD <----- active
  Browsers:
  npmPackages:
    @storybook/addon-a11y: ^8.0.10 => 8.0.10
    @storybook/addon-essentials: ^8.0.10 => 8.0.10
    @storybook/addon-interactions: ^8.0.10 => 8.0.10
    @storybook/addon-themes: ^8.0.10 => 8.0.10
    @storybook/blocks: ^8.0.0-rc.1 => 8.0.10
    @storybook/preview-api: 8.0.10 => 8.0.10
    @storybook/react: ^8.0.10 => 8.0.10
    @storybook/react-vite: ^8.0.10 => 8.0.10
    @storybook/theming: ^8.0.10 => 8.0.10
    chromatic: 11.3.0 => 11.3.0
    eslint-plugin-storybook: 0.8.0 => 0.8.0
    storybook: ^8.0.10 => 8.0.10

Additional context

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions