mirror of
https://github.com/wukko/cobalt.git
synced 2024-11-15 12:50:01 +00:00
web/skeleton: don't render if hidden
This commit is contained in:
parent
705fac16a6
commit
c03337fed9
1 changed files with 3 additions and 2 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue