components-test-pb 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -5,9 +5,11 @@ export function assertSlots(state) {
|
|
|
5
5
|
const Component = components[name];
|
|
6
6
|
const slotProps = state[name];
|
|
7
7
|
if (slotProps != null) {
|
|
8
|
-
|
|
8
|
+
const fn = (jsxProps) => {
|
|
9
9
|
return jsx(Component, { ...slotProps, ...jsxProps });
|
|
10
10
|
};
|
|
11
|
+
fn.children = slotProps.children;
|
|
12
|
+
state[name] = fn;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
}
|
package/package.json
CHANGED
|
@@ -12,9 +12,11 @@ export function assertSlots<Slots extends SlotPropsRecord>(
|
|
|
12
12
|
const slotProps = (state as any)[name];
|
|
13
13
|
|
|
14
14
|
if (slotProps != null) {
|
|
15
|
-
|
|
15
|
+
const fn = (jsxProps: any) => {
|
|
16
16
|
return jsx(Component, { ...slotProps, ...jsxProps });
|
|
17
17
|
};
|
|
18
|
+
fn.children = slotProps.children;
|
|
19
|
+
(state as any)[name] = fn;
|
|
18
20
|
}
|
|
19
21
|
}
|
|
20
22
|
}
|