Create component for navbar buttons

This commit is contained in:
Joscha 2025-01-28 22:26:57 +01:00
parent d9722e13f7
commit 5b04ca821c
2 changed files with 12 additions and 7 deletions

View file

@ -1,6 +1,7 @@
<script setup lang="ts">
import { useReposStore } from "@/stores/repos";
import { RiDeleteBinFill, RiSettings3Fill } from "@remixicon/vue";
import CNavbarButton from "./CNavbarButton.vue";
import CNavbarDropdown from "./CNavbarDropdown.vue";
const repos = useReposStore();
@ -15,19 +16,16 @@ const repos = useReposStore();
</div>
<!-- Temporary delete button until I add proper repo settings -->
<div
<CNavbarButton
v-show="repos.selectedRepo !== undefined"
class="flex select-none items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
@click="repos.removeRepo(repos.selectedRepoId)"
>
<RiDeleteBinFill size="16px" class="inline" />
</div>
</CNavbarButton>
<!-- Nothing hooked up yet -->
<div
class="flex select-none items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
>
<CNavbarButton>
<RiSettings3Fill size="16px" class="inline" />
</div>
</CNavbarButton>
</div>
</template>

View file

@ -0,0 +1,7 @@
<template>
<div
class="flex select-none items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
>
<slot></slot>
</div>
</template>