-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create and expose a new internal slot so we can re-insert the legacy …
…controls.
- Loading branch information
1 parent
ef78481
commit 331ecda
Showing
2 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { createSlotFill } from '@wordpress/components'; | ||
|
||
/** | ||
* Create our Slot and Fill components | ||
*/ | ||
const { Fill, Slot } = createSlotFill( 'AQLLegacyControls' ); | ||
|
||
/** | ||
* This slot is not exposed and is used to try to maintain the same UI | ||
*/ | ||
|
||
const AQLLegacyControls = ( { children } ) => <Fill>{ children }</Fill>; | ||
|
||
AQLLegacyControls.Slot = ( { fillProps } ) => ( | ||
<Slot fillProps={ fillProps }> | ||
{ ( fills ) => { | ||
return fills.length ? fills : null; | ||
} } | ||
</Slot> | ||
); | ||
|
||
export default AQLLegacyControls; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters