Skip to content

Commit

Permalink
Fix sample code on InputControl docs (#59517)
Browse files Browse the repository at this point in the history
* Docs: Fixed sample code on InputControl docs

* Docs: Fixed sample code for InputControl

* Docs: Fixed sample code for InputControl

* Import useState from react package

* Use wordpress/element package on source code, React for documentation purposes.

* Using react in sample code (documentation)

* Remove unnecessary space

---------

Co-authored-by: flexseth <flexseth@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
  • Loading branch information
5 people committed Mar 11, 2024
1 parent 17ef9a6 commit 33056a4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## 27.1.0 (2024-03-06)

### Bug Fix

- `InputControl`: Fix sample code on InputControl docs [#59517](https://github.com/WordPress/gutenberg/pull/59517)
- `Tooltip`: Explicitly set system font to avoid CSS bleed ([#59307](https://github.com/WordPress/gutenberg/pull/59307)).
- `HStack`, `VStack`: Stop passing invalid props to underlying element ([#59416](https://github.com/WordPress/gutenberg/pull/59416)).
- `Button`: Fix focus outline in disabled primary variant ([#59391](https://github.com/WordPress/gutenberg/pull/59391)).
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/input-control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ InputControl components let users enter and edit text. This is an experimental c

```js
import { __experimentalInputControl as InputControl } from '@wordpress/components';
import { useState } from '@wordpress/compose';
import { useState } from 'react';

const Example = () => {
const [ value, setValue ] = useState( '' );
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/input-control/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function UnforwardedInputControl(
*
* ```jsx
* import { __experimentalInputControl as InputControl } from '@wordpress/components';
* import { useState } from '@wordpress/compose';
* import { useState } from 'react';
*
* const Example = () => {
* const [ value, setValue ] = useState( '' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ However, instead of opening up the selection in a modal, the selection opens up
* WordPress dependencies
*/
import { BottomSheetSelectControl } from '@wordpress/components';
import { useState } from '@wordpress/compose';
import { useState } from 'react';

const options = [
{
Expand Down

0 comments on commit 33056a4

Please sign in to comment.