Modrinth/lib/components/search/Categories.vue
Geometrically 1db59fc052
Knossos Catch-up (#58)
* Knossos Catch-up

* bump version

* fix build

* fix build again

* Fix lint

* downgrade pnpm

* fix modals

* fix btn style

* add missing styles
2023-05-28 16:36:49 -04:00

58 lines
910 B
Vue

<template>
<div class="categories">
<slot />
<span
v-for="category in categories"
:key="category.name"
v-html="category.icon + formatCategory(category.name)"
/>
</div>
</template>
<script setup>
import { formatCategory } from '@/helpers/utils.js'
</script>
<script>
export default {
name: 'Categories',
props: {
categories: {
type: Array,
default() {
return []
},
},
type: {
type: String,
required: true,
},
},
methods: {
formatCategory,
},
}
</script>
<style lang="scss" scoped>
.categories {
display: flex;
flex-direction: row;
flex-wrap: wrap;
gap: var(--gap-sm);
:deep(span) {
display: flex;
flex-direction: row;
align-items: center;
&:not(.version-badge) {
color: var(--color-gray);
}
svg {
width: 1rem;
margin-right: 0.2rem;
}
}
}
</style>