Skip to content

Commit

Permalink
Merge pull request #25041 from storybookjs/update-arg-types-api-ref
Browse files Browse the repository at this point in the history
Docs: Add `control: false`, `table.disable` to argTypes API reference
  • Loading branch information
kylegach authored Nov 29, 2023
2 parents a0c55d8 + d05a99f commit 57077ab
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/api/arg-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Type:
```ts
{
[key: string]: {
control?: ControlType | { type: ControlType; /* See below for more */ };
control?: ControlType | { type: ControlType; /* See below for more */ } | false;
description?: string;
if?: Conditional;
mapping?: { [key: string]: { [option: string]: any } };
Expand All @@ -91,6 +91,7 @@ Type:
table?: {
category?: string;
defaultValue?: { summary: string; detail?: string };
disable?: boolean;
subcategory?: string;
type?: { summary?: string; detail?: string };
},
Expand All @@ -116,6 +117,7 @@ Type:
presetColors?: string[];
step?: number;
}
| false
```

Default:
Expand All @@ -124,7 +126,7 @@ Default:
2. Else, inferred from [`type`](#type)
3. Else, `'object'`

Specify the behavior of the [controls addon](../essentials/controls.md) for the arg. If you specify a string, it's used as the [`type`](#controltype) of the control. If you specify an object, you can provide additional configuration.
Specify the behavior of the [controls addon](../essentials/controls.md) for the arg. If you specify a string, it's used as the [`type`](#controltype) of the control. If you specify an object, you can provide additional configuration. Specifying `false` will prevent the control from rendering.

<!-- prettier-ignore-start -->

Expand Down Expand Up @@ -345,6 +347,7 @@ Type:
detail?: string;
summary: string;
};
disable?: boolean;
subcategory?: string;
type?: {
detail?: string;
Expand Down Expand Up @@ -387,6 +390,12 @@ Default: [Inferred](#automatic-argtype-inference)

The documented default value of the argType. `summary` is typically used for the value itself, while `detail` is used for additional information.

#### `table.disable`

Type: `boolean`

Set to `true` to remove the argType's row from the table.

#### `table.subcategory`

Type: `string`
Expand Down

0 comments on commit 57077ab

Please sign in to comment.