Skip to content

Commit

Permalink
Add simpler slotfill example
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jan 26, 2022
1 parent e4b2248 commit 686e848
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/components/src/utils/hooks/stories/use-cx.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,26 @@ export const _slotfill = () => {
);
};

export const _slotFillSimple = () => {
const { Fill, Slot } = createSlotFill( 'UseCxExampleSlotTwo' );

const redText = css`
color: red;
`;

return (
<SlotFillProvider>
<Iframe>
<Fill name="test-slot">
<Example args={ [ redText ] }>
This text should be red
</Example>
</Fill>
</Iframe>
<Slot bubblesVirtually name="test-slot" />
</SlotFillProvider>
);
};
export const _default = () => {
const redText = css`
color: red;
Expand Down

0 comments on commit 686e848

Please sign in to comment.