Skip to content

Commit

Permalink
Add SlotFill provider as wrapper to storybook example
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronrobertshaw committed Mar 24, 2022
1 parent ca889df commit 1aeb812
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/components/src/border-box-control/stories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { useEffect, useState } from '@wordpress/element';
* Internal dependencies
*/
import Button from '../../button';
import Popover from '../../popover';
import { BorderBoxControl } from '../';
import { Provider as SlotFillProvider } from '../../slot-fill';

// Available border colors.
const colors = [
Expand Down Expand Up @@ -48,7 +50,7 @@ const _default = ( props ) => {
useEffect( () => setBorders( defaultBorder ), [ defaultBorder ] );

return (
<>
<SlotFillProvider>
<WrapperView>
<BorderBoxControl
colors={ colors }
Expand All @@ -67,7 +69,8 @@ const _default = ( props ) => {
<Button variant="primary" onClick={ () => setBorders( undefined ) }>
Reset
</Button>
</>
<Popover.Slot />
</SlotFillProvider>
);
};

Expand Down

0 comments on commit 1aeb812

Please sign in to comment.