Skip to content

Commit

Permalink
TextControl: Set Storybook control types on help, label and type (#45405
Browse files Browse the repository at this point in the history
)

* TextControl: Add storybook control type on help, label and type

* Update changelog
  • Loading branch information
Petter Walbø Johnsgård authored Oct 31, 2022
1 parent 19186e5 commit f18d346
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
5 changes: 3 additions & 2 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
- `ItemGroup`: fix RTL `Item` styles when rendered as a button ([#45280](https://github.com/WordPress/gutenberg/pull/45280)).
- `Button`: Fix RTL alignment for buttons containing an icon and text ([#44787](https://github.com/WordPress/gutenberg/pull/44787)).
- `TabPanel`: Call `onSelect()` on every tab selection, regardless of whether it was triggered by user interaction ([#44028](https://github.com/WordPress/gutenberg/pull/44028)).
- `FontSizePicker`: Fallback to font size `slug` if `name` is undefined ([#45041](https://github.com/WordPress/gutenberg/pull/45041)).
- `FontSizePicker`: Fallback to font size `slug` if `name` is undefined ([#45041](https://github.com/WordPress/gutenberg/pull/45041)).
- `AutocompleterUI`: fix issue where autocompleter UI would appear on top of other UI elements ([#44795](https://github.com/WordPress/gutenberg/pull/44795/))
- `ExternalLink`: Fix to re-enable support for `onClick` event handler ([#45214](https://github.com/WordPress/gutenberg/pull/45214)).

Expand All @@ -50,6 +50,7 @@
- `UnitControl`: Add tests ([#45260](https://github.com/WordPress/gutenberg/pull/45260)).
- `Disabled`: Refactor the component to rely on the HTML `inert` attribute.
- `CustomGradientBar`: Refactor away from Lodash ([#45367](https://github.com/WordPress/gutenberg/pull/45367/)).
- `TextControl`: Set Storybook control types on `help`, `label` and `type` ([#45405](https://github.com/WordPress/gutenberg/pull/45405)).
- `Autocomplete`: use Popover's new `placement` prop instead of legacy `position` prop ([#44396](https://github.com/WordPress/gutenberg/pull/44396/)).

## 21.3.0 (2022-10-19)
Expand All @@ -59,7 +60,7 @@
- `FontSizePicker`: Ensure that fluid font size presets appear correctly in the UI controls ([#44791](https://github.com/WordPress/gutenberg/pull/44791)).
- `ToggleGroupControl`: Remove unsupported `disabled` prop from types, and correctly mark `label` prop as required ([#45114](https://github.com/WordPress/gutenberg/pull/45114)).
- `Navigator`: prevent partially hiding focus ring styles, by removing unnecessary overflow rules on `NavigatorScreen` ([#44973](https://github.com/WordPress/gutenberg/pull/44973)).
- `Navigator`: restore focus only once per location ([#44972](https://github.com/WordPress/gutenberg/pull/44972)).
- `Navigator`: restore focus only once per location ([#44972](https://github.com/WordPress/gutenberg/pull/44972)).

### Documentation

Expand Down
2 changes: 0 additions & 2 deletions packages/components/src/text-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,6 @@ function UnforwardedTextControl(
/**
* TextControl components let users enter and edit text.
*
*
* @example
* ```jsx
* import { TextControl } from '@wordpress/components';
* import { useState } from '@wordpress/element';
Expand Down
11 changes: 5 additions & 6 deletions packages/components/src/text-control/stories/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ const meta: ComponentMeta< typeof TextControl > = {
component: TextControl,
title: 'Components/TextControl',
argTypes: {
onChange: {
action: 'onChange',
},
value: {
control: { type: null },
},
help: { control: { type: 'text' } },
label: { control: { type: 'text' } },
type: { control: { type: 'text' } },
onChange: { action: 'onChange' },
value: { control: { type: null } },
},
parameters: {
controls: {
Expand Down

0 comments on commit f18d346

Please sign in to comment.