mobilizon.chapril.org-mobil.../js/src/components/Group/GroupSection.vue
Thomas Citharel ee20e03cc2
Migrate to Vue 3 and Vite
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2022-08-11 16:46:31 +02:00

41 lines
1010 B
Vue

<template>
<section
class="flex flex-col mb-3 border-2"
:class="{
'border-mbz-purple': privateSection,
'border-yellow-1': !privateSection,
}"
>
<div class="flex items-stretch py-3 px-1 bg-yellow-1 text-violet-title">
<div class="flex flex-1 gap-1">
<o-icon :icon="icon" custom-size="36" />
<h2 class="text-2xl font-medium mt-0">{{ title }}</h2>
</div>
<router-link class="self-center" :to="route">{{
t("View all")
}}</router-link>
</div>
<div class="flex-1">
<slot></slot>
</div>
<div class="flex justify-end p-2">
<slot name="create"></slot>
</div>
</section>
</template>
<script lang="ts" setup>
import { useI18n } from "vue-i18n";
withDefaults(
defineProps<{
title: string;
icon: string;
privateSection?: boolean;
route: { name: string; params: { preferredUsername: string } };
}>(),
{ privateSection: true }
);
const { t } = useI18n({ useScope: "global" });
</script>