storybookjs/storybook

[Documentation]: Documentation for `argTypes` is not correct

已关闭

#24,174 创建于 2023年9月14日

 (8 条评论) (0 个反应) (0 位负责人)TypeScript (10,058 个派生)batch import
argtypeshelp wantedtypescript

仓库指标

星标
 (89,909 个星标)
PR 合并指标
 (平均合并 7天 22小时) (30 天内合并 184 个 PR)

描述

Describe the problem

The docs say:

But the actual type is:

interface InputType {
    name?: string;
    description?: string;
    defaultValue?: any;
    type?: SBType | SBScalarType['name'];
    if?: Conditional;
    [key: string]: any;
}

I'm willing to work on this if it's indeed wrong.

Additional context

Edit: Taking another look at this - you can indeed pass options and control and it does work but it is not documented in the type.

贡献者指南