script editor
This commit is contained in:
@@ -3,9 +3,12 @@
|
||||
|
||||
export let expanded: boolean;
|
||||
export let title: string;
|
||||
export let disableExpandToggle: boolean = false;
|
||||
|
||||
function toggleExpand() {
|
||||
expanded = !expanded;
|
||||
if (!disableExpandToggle) {
|
||||
expanded = !expanded;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,7 +16,9 @@
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="modal-section-header" on:click={toggleExpand}>
|
||||
<div class="title">{title}</div>
|
||||
<Icon block name="{expanded ? "chevron_down" : "chevron_right"}" />
|
||||
{#if !disableExpandToggle}
|
||||
<Icon block name="{expanded ? "chevron_down" : "chevron_right"}" />
|
||||
{/if}
|
||||
</div>
|
||||
<div class="modal-section-body">
|
||||
<slot></slot>
|
||||
|
||||
Reference in New Issue
Block a user