Do not pass static down to underlying HTML elements

Since it was not explicitly exported it appeared in $$restProps. Harmless, but clutters up the HTML.
This commit is contained in:
Ryan Gossiaux
2022-03-06 15:51:39 -08:00
parent 096390554c
commit 3014990142

View File

@@ -46,6 +46,8 @@
export let features: Features = Features.None;
// The static and unmount props are only used in conjunction with the render strategies
export let unmount = true;
let static_ = false;
export { static_ as static };
let classProp: ((props: TSlotProps) => string) | string | undefined =
undefined;
@@ -72,11 +74,11 @@
$: show =
visible ||
(features & Features.Static && $$props.static) ||
(features & Features.Static && static_) ||
!(features & Features.RenderStrategy && unmount);
$: hidden =
!visible &&
!(features & Features.Static && $$props.static) &&
!(features & Features.Static && static_) &&
features & Features.RenderStrategy &&
!unmount;