From d64e206d03762fc0c109c222f14711b83ba5b44b Mon Sep 17 00:00:00 2001 From: Kamil Szubrycht Date: Thu, 26 May 2022 12:33:31 +0200 Subject: [PATCH] Allow to pass down props from core to plugins --- src/components/Slot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Slot.js b/src/components/Slot.js index ca8c98a0..a0cdf33f 100644 --- a/src/components/Slot.js +++ b/src/components/Slot.js @@ -2,15 +2,15 @@ import React, { Fragment } from 'react' import { pluginsExtensions } from 'plugins' import pipe from 'helpers/pipe' -const Slot = ({ name, elements }) => { +const Slot = ({ name, elements, ...sharedProps }) => { const extensions = pluginsExtensions.filter(({ slot }) => slot === name).map(({ extension }) => extension) const withExtensions = extensions.length ? pipe(...extensions)(elements) : elements return ( { withExtensions.map(({ - components: [InitialComponent, ...components], ...attrs - }, i) => ) } + components: [InitialComponent, ...components], ...props + }, i) => ) } ) }