Create component for navbar buttons
This commit is contained in:
parent
d9722e13f7
commit
5b04ca821c
2 changed files with 12 additions and 7 deletions
|
|
@ -1,6 +1,7 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useReposStore } from "@/stores/repos";
|
import { useReposStore } from "@/stores/repos";
|
||||||
import { RiDeleteBinFill, RiSettings3Fill } from "@remixicon/vue";
|
import { RiDeleteBinFill, RiSettings3Fill } from "@remixicon/vue";
|
||||||
|
import CNavbarButton from "./CNavbarButton.vue";
|
||||||
import CNavbarDropdown from "./CNavbarDropdown.vue";
|
import CNavbarDropdown from "./CNavbarDropdown.vue";
|
||||||
|
|
||||||
const repos = useReposStore();
|
const repos = useReposStore();
|
||||||
|
|
@ -15,19 +16,16 @@ const repos = useReposStore();
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Temporary delete button until I add proper repo settings -->
|
<!-- Temporary delete button until I add proper repo settings -->
|
||||||
<div
|
<CNavbarButton
|
||||||
v-show="repos.selectedRepo !== undefined"
|
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)"
|
@click="repos.removeRepo(repos.selectedRepoId)"
|
||||||
>
|
>
|
||||||
<RiDeleteBinFill size="16px" class="inline" />
|
<RiDeleteBinFill size="16px" class="inline" />
|
||||||
</div>
|
</CNavbarButton>
|
||||||
|
|
||||||
<!-- Nothing hooked up yet -->
|
<!-- Nothing hooked up yet -->
|
||||||
<div
|
<CNavbarButton>
|
||||||
class="flex select-none items-center rounded-md bg-neutral-800 px-2 hover:bg-neutral-700 active:bg-neutral-500"
|
|
||||||
>
|
|
||||||
<RiSettings3Fill size="16px" class="inline" />
|
<RiSettings3Fill size="16px" class="inline" />
|
||||||
</div>
|
</CNavbarButton>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
7
gdn-app/src/components/CNavbarButton.vue
Normal file
7
gdn-app/src/components/CNavbarButton.vue
Normal 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>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue