macro parameters

This commit is contained in:
Jan Prochazka
2021-03-14 20:44:19 +01:00
parent 49337a4112
commit 0af207d330
12 changed files with 307 additions and 16 deletions

View File

@@ -0,0 +1,20 @@
<script lang="ts">
export let label;
export let labelProps: any = {};
</script>
<div class="row">
<div class="label" {...labelProps} on:click={labelProps.onClick}>{label}</div>
<div><slot /></div>
</div>
<style>
.row {
display: flex;
margin: 10px;
}
.label {
width: 10vw;
font-weight: bold;
}
</style>