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