Skip to content

Commit c1ba13e

Browse files
sirrealgziolo
authored andcommitted
Update Fragment imports in READMEs (#15262)
Some Fragment imports were incorrect. Fix them.
1 parent 297c2f4 commit c1ba13e

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

  • packages
    • block-editor/src/components/url-popover
    • components/src/higher-order/with-filters

packages/block-editor/src/components/url-popover/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ URLPopover is a presentational React component used to render a popover used for
88
The component will be rendered adjacent to its parent.
99

1010
```jsx
11-
import { Fragment } from '@wordpress/elements';
11+
import { Fragment } from '@wordpress/element';
1212
import { ToggleControl, IconButton, Button } from '@wordpress/components';
1313
import { URLPopover } from '@wordpress/block-editor';
1414

packages/components/src/higher-order/with-filters/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Wrapping a component with `withFilters` provides a filtering capability controll
77
## Usage
88

99
```jsx
10-
import { Fragment, withFilters } from '@wordpress/components';
10+
import { Fragment } from '@wordpress/element';
11+
import { withFilters } from '@wordpress/components';
1112
import { addFilter } from '@wordpress/hooks';
1213

1314
const MyComponent = ( { title } ) => <h1>{ title }</h1>;
@@ -37,7 +38,8 @@ const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );
3738
It is also possible to override props by implementing a higher-order component which works as follows:
3839

3940
```jsx
40-
import { Fragment, withFilters } from '@wordpress/components';
41+
import { Fragment } from '@wordpress/element';
42+
import { withFilters } from '@wordpress/components';
4143
import { addFilter } from '@wordpress/hooks';
4244

4345
const MyComponent = ( { hint, title } ) => (

0 commit comments

Comments
 (0)