web/skeleton: don't render if hidden

This commit is contained in:
dumbmoron 2024-07-22 10:11:23 +00:00 committed by wukko
parent 705fac16a6
commit c03337fed9
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2

View file

@ -10,16 +10,17 @@
$: style = [ $: style = [
width && `width: ${width}`, width && `width: ${width}`,
height && `height: ${height}`, height && `height: ${height}`
hidden && `display: none`
].filter(a => a).join(';'); ].filter(a => a).join(';');
</script> </script>
{#if hidden !== true}
<div <div
class="skeleton {_class}" class="skeleton {_class}"
{style} {style}
{...$$restProps} {...$$restProps}
></div> ></div>
{/if}
<style> <style>
.skeleton { .skeleton {