2022-03-03 00:42:43 +08:00
|
|
|
<script lang="ts">
|
2022-03-17 00:34:30 +08:00
|
|
|
import { createEventDispatcher } from "svelte";
|
|
|
|
|
2023-08-04 06:01:18 +08:00
|
|
|
export let elem_id = "";
|
|
|
|
export let elem_classes: string[] = [];
|
2022-03-03 00:42:43 +08:00
|
|
|
export let value: string;
|
2023-08-04 06:01:18 +08:00
|
|
|
export let visible = true;
|
2022-11-10 03:48:17 +08:00
|
|
|
export let min_height = false;
|
2022-03-17 00:34:30 +08:00
|
|
|
|
|
|
|
const dispatch = createEventDispatcher<{ change: undefined }>();
|
|
|
|
|
|
|
|
$: value, dispatch("change");
|
2022-03-03 00:42:43 +08:00
|
|
|
</script>
|
|
|
|
|
2023-03-16 05:01:53 +08:00
|
|
|
<div
|
|
|
|
class="prose {elem_classes.join(' ')}"
|
|
|
|
class:min={min_height}
|
|
|
|
id={elem_id}
|
|
|
|
class:hide={!visible}
|
|
|
|
>
|
2022-03-03 00:42:43 +08:00
|
|
|
{@html value}
|
|
|
|
</div>
|
2023-01-18 04:47:40 +08:00
|
|
|
|
|
|
|
<style>
|
|
|
|
.min {
|
|
|
|
min-height: var(--size-24);
|
|
|
|
}
|
|
|
|
.hide {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
</style>
|