Files
Modrinth-plus/lib/components/nav/NavItem.vue

51 lines
727 B
Vue
Raw Normal View History

2023-02-16 14:02:39 -08:00
<script setup>
2023-02-18 11:43:12 -07:00
import { Button } from '@/components'
2023-02-16 14:02:39 -08:00
defineProps({
link: {
type: String,
default: null,
},
external: {
type: Boolean,
default: false,
},
action: {
type: Function,
default: null,
},
selected: {
type: Boolean,
default: false,
},
label: {
type: String,
required: true,
},
icon: {
type: String,
default: null,
},
2023-02-18 11:43:12 -07:00
})
2023-02-16 14:02:39 -08:00
</script>
<template>
<Button
:link="link"
:external="external"
:action="action"
design="nav"
class="quiet-disabled"
:class="{
selected: selected,
}"
:disabled="selected"
:navlabel="label"
>
2023-02-18 11:43:12 -07:00
<slot />
2023-02-16 14:02:39 -08:00
{{ label }}
</Button>
</template>
<style lang="scss" scoped></style>