Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button: refactor Storybook to controls and align docs #44105

Merged
merged 10 commits into from
Oct 21, 2022
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
### Internal

- `AnglePickerControl`: Set Storybook Label control type to 'text' ([#45122](https://github.com/WordPress/gutenberg/pull/45122)).
- `Button`: Refactor Storybook to controls and align docs ([#44105](https://github.com/WordPress/gutenberg/pull/44105)).

## 21.3.0 (2022-10-19)

Expand Down
17 changes: 2 additions & 15 deletions packages/components/src/button/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,63 +127,55 @@ Whether the button is disabled. If `true`, this will force a `button` element to

- Type: `Boolean`
- Required: No
- Default: `false`

#### href

If provided, renders `a` instead of `button`.

- Type: `String`
- Required: No
- Default: `undefined`

#### variant

Specifies the button's style. The accepted values are `'primary'` (the primary button styles), `'secondary'` (the default button styles), `'tertiary'` (the text-based button styles), and `'link'` (the link button styles).

- Type: `String`
- Required: No
- Default: `undefined`

#### isDestructive

Renders a red text-based button style to indicate destructive behavior.

- Type: `Boolean`
- Required: No
- Default: `false`

#### isSmall

Decreases the size of the button.

- Type: `Boolean`
- Required: No
- Default: `false`

#### isPressed

Renders a pressed button style.

- Type: `Boolean`
- Required: No
- Default: `false`

#### isBusy

Indicates activity while a action is being performed.

- Type: `Boolean`
- Required: No
- Default: `false`

#### focus

Whether the button is focused.

- Type: `Boolean`
- Required: No
- Default: `false`

#### target

Expand All @@ -205,15 +197,13 @@ If provided, renders an [Icon](/packages/components/src/icon/README.md) componen

- Type: `String|Function|WPComponent|null`
- Required: No
- Default: `null`

#### iconSize

If provided with `icon`, sets the icon size.
If provided with `icon`, sets the icon size. Please refer to the [Icon](/packages/components/src/icon/README.md) component for more details regarding the default value of its `size` prop.

- Type: `Number`
- Required: No
- Default: `20 when a Dashicon is rendered, 24 for all other icons.`

#### iconPosition

Expand All @@ -236,23 +226,20 @@ If provided, renders a [Tooltip](/packages/components/src/tooltip/README.md) com

- Type: `Boolean`
- Required: No
- Default: `false`

#### tooltipPosition

If provided with`showTooltip`, sets the position of the tooltip.
If provided with`showTooltip`, sets the position of the tooltip. Please refer to the [Tooltip](/packages/components/src/tooltip/README.md) component for more details regarding the defaults.

- Type: `String`
- Require: No
- Default:`top center`

#### shortcut

If provided with `showTooltip`, appends the Shortcut label to the tooltip content. If an `Object` is provided, it should contain `display` and `ariaLabel` keys.

- Type: `String|Object`
- Required: No
- Default: `undefined`

#### label

Expand Down
Loading