Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
--- /dev/null
+<script setup lang="ts">
+ import { ref } from "vue";
+
+ defineProps<{
+ title?: string,
+ isClosable?: boolean,
+ }>()
+
+ // Should this notification be shown?
+ const show = ref(true);
+</script>
+
+<template>
+ <div class="notification" v-if="show">
+ <button v-if="isClosable" class="delete" @click="show = false"></button>
+
+ <!-- Title -->
+ <p v-if="title">
+ <strong>{{ title }}</strong>
+ </p>
+
+ <!-- Content -->
+ <slot />
+ </div>
+</template>
-->
<script setup lang="ts">
+ import Notification from "../components/Notification.vue"
import Section from "../components/Section.vue"
</script>
<Section :title="$t('This Is A Section')">
<p>{{ $t("The section can have any content...") }}</p>
</Section>
+
+ <Section :title="$t('Notifications')">
+ <Notification>
+ {{ $t("This is a regular notification.") }}
+ </Notification>
+
+ <Notification :title="$t('Title')">
+ {{ $t("This notification has a title.") }}
+ </Notification>
+
+ <Notification is-closable>
+ {{ $t("This notification can be closed.") }}
+ </Notification>
+ </Section>
</template>