Skip to content

Commit

Permalink
Components: Avoid SlotFill props destructuring (#10921)
Browse files Browse the repository at this point in the history
  • Loading branch information
aduth authored and gziolo committed Oct 23, 2018
1 parent 1cd604d commit 80e782c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/components/src/slot-fill/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,10 @@ export { Fill };
export { Provider };

export function createSlotFill( name ) {
const FillComponent = ( { children, ...props } ) => (
<Fill name={ name } { ...props }>
{ children }
</Fill>
);
const FillComponent = ( props ) => <Fill name={ name } { ...props } />;
FillComponent.displayName = name + 'Fill';

const SlotComponent = ( { children, ...props } ) => (
<Slot name={ name } { ...props }>
{ children }
</Slot>
);
const SlotComponent = ( props ) => <Slot name={ name } { ...props } />;
SlotComponent.displayName = name + 'Slot';

return {
Expand Down

0 comments on commit 80e782c

Please sign in to comment.