corvée(dépendances) ajoute Carbon Fields
This commit is contained in:
parent
135cc65eed
commit
62368587e5
459 changed files with 72750 additions and 26 deletions
24
web/vendor/htmlburger/carbon-fields/packages/metaboxes/hocs/with-container/index.js
vendored
Normal file
24
web/vendor/htmlburger/carbon-fields/packages/metaboxes/hocs/with-container/index.js
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* External dependencies.
|
||||
*/
|
||||
import { withSelect } from '@wordpress/data';
|
||||
import { createHigherOrderComponent } from '@wordpress/compose';
|
||||
|
||||
/**
|
||||
* Creates a high-order component which adds connection
|
||||
* to the store.
|
||||
*
|
||||
* @param {Function} Component
|
||||
* @return {Function}
|
||||
*/
|
||||
export default createHigherOrderComponent( ( Component ) => {
|
||||
const applyWithSelect = withSelect( ( select, { id } ) => {
|
||||
const container = select( 'carbon-fields/metaboxes' ).getContainerById( id );
|
||||
|
||||
return {
|
||||
container
|
||||
};
|
||||
} );
|
||||
|
||||
return applyWithSelect( Component );
|
||||
}, 'withContainer' );
|
||||
Loading…
Add table
Add a link
Reference in a new issue