storybookjs/storybook

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

クローズ

#24,174 opened on 2023/09/14

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)TypeScript (10,058 件のフォーク)batch import
argtypeshelp wantedtypescript

Repository metrics

Stars
 (89,909 個のスター)
PR merge metrics
 (平均マージ 7d 22h) (30d で 184 merged PRs)

説明

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.

コントリビューターガイド