File tree Expand file tree Collapse file tree
block-editor/src/components/url-popover
components/src/higher-order/with-filters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ URLPopover is a presentational React component used to render a popover used for
88The component will be rendered adjacent to its parent.
99
1010``` jsx
11- import { Fragment } from ' @wordpress/elements ' ;
11+ import { Fragment } from ' @wordpress/element ' ;
1212import { ToggleControl , IconButton , Button } from ' @wordpress/components' ;
1313import { URLPopover } from ' @wordpress/block-editor' ;
1414
Original file line number Diff line number Diff 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' ;
1112import { addFilter } from ' @wordpress/hooks' ;
1213
1314const MyComponent = ( { title } ) => < h1> { title }< / h1> ;
@@ -37,7 +38,8 @@ const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );
3738It 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' ;
4143import { addFilter } from ' @wordpress/hooks' ;
4244
4345const MyComponent = ( { hint, title } ) => (
You can’t perform that action at this time.
0 commit comments