metis/src/EventModal.svelte

24 lines
602 B
Svelte
Raw Normal View History

2022-03-06 00:59:36 +01:00
<script>
import { Modal, ModalHeader, ModalBody, ModalFooter, Icon } from 'sveltestrap';
export let event = undefined;
export let open = undefined;
export let toggle = undefined;
</script>
<Modal isOpen={open} {toggle} centered scrollable>
<ModalHeader {toggle}>{event.title}</ModalHeader>
{#if event.extendedProps.description}
<ModalBody>
{#each event.extendedProps.description.split('\n') as line}
<p>{line}</p>
{/each}
</ModalBody>
{/if}
{#if event.extendedProps.location}
<ModalFooter>
<Icon name="geo" />
</ModalFooter>
{/if}
</Modal>