File size: 510 Bytes
8fdc036 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<script lang="ts">
import { createEventDispatcher } from "svelte";
export let elem_classes: string[] = [];
export let value: string;
export let visible = true;
export let min_height = false;
const dispatch = createEventDispatcher<{ change: undefined }>();
$: value, dispatch("change");
</script>
<div
class="prose {elem_classes.join(' ')}"
class:min={min_height}
class:hide={!visible}
>
{@html value}
</div>
<style>
.min {
min-height: var(--size-24);
}
.hide {
display: none;
}
</style>
|