collection toolbar

This commit is contained in:
nquidox 2025-09-16 19:59:42 +03:00
parent 6166708b77
commit faaef828cf
2 changed files with 75 additions and 2 deletions

View file

@ -1,9 +1,10 @@
<script setup lang="ts"> <script setup>
import CollectionToolbar from '@/views/CollectionView/CollectionToolbar.vue'
</script> </script>
<template> <template>
Collection View <CollectionToolbar />
</template> </template>
<style scoped> <style scoped>

View file

@ -0,0 +1,72 @@
<script setup>
import { ref } from 'vue'
const value = ref(null)
const options = [
{ label: 'Placeholder 1', value: 'Placeholder 1' },
{ label: 'Placeholder 2', value: 'Placeholder 2' },
]
</script>
<template>
<div class="toolbar">
<n-button type="primary" class="toolbar-item"> Add merch </n-button>
<div class="search-wrapper toolbar-item">
<n-input placeholder="Search..." clearable />
</div>
<div class="selector toolbar-item">
<n-select
placeholder="Select label"
clearable
multiple
v-model:value="value"
:options="options"
class="mobile-full-width" />
</div>
</div>
</template>
<style scoped>
.toolbar {
display: flex;
align-items: center;
gap: 16px;
padding: 16px;
background-color: #f5f5f5;
border-bottom: 1px solid #e0e0e0;
border-radius: 8px;
flex-wrap: wrap;
}
.toolbar-item {
flex-shrink: 0;
}
.search-wrapper {
flex-grow: 1;
min-width: 200px;
}
.selector {
min-width: 220px;
}
@media (max-width: 768px) {
.selector {
flex-basis: 100%;
margin-left: auto;
}
}
@media (max-width: 768px) {
.search-wrapper {
flex-basis: 100%;
}
}
:deep(.mobile-full-width) {
width: 100%;
}
</style>