refactor: componentize responsive grid
This commit is contained in:
parent
f0fb7a5981
commit
7c0a3b6375
2 changed files with 28 additions and 31 deletions
|
|
@ -1,33 +1,12 @@
|
|||
<template>
|
||||
<div class="tab-content grid md:overflow-hidden">
|
||||
<template v-for="(mission, index) in $store.state.missions">
|
||||
<progress-button
|
||||
:key="index"
|
||||
:label="mission.name"
|
||||
:description="mission.description"
|
||||
:max="mission.completionCriteria.cost"
|
||||
:value="$store.state.currency"
|
||||
/>
|
||||
</template>
|
||||
</div>
|
||||
<responsive-grid>
|
||||
<progress-button
|
||||
v-for="(mission, index) in $store.state.missions"
|
||||
:key="index"
|
||||
:label="mission.name"
|
||||
:description="mission.description"
|
||||
:max="mission.completionCriteria.cost"
|
||||
:value="$store.state.currency"
|
||||
/>
|
||||
</responsive-grid>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.tab-content {
|
||||
--columns: 1;
|
||||
grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
|
||||
grid-gap: 1rem;
|
||||
}
|
||||
/* md */
|
||||
@media (min-width: 768px) {
|
||||
.tab-content {
|
||||
--columns: 2;
|
||||
}
|
||||
}
|
||||
/* 2xl */
|
||||
@media (min-width: 1536px) {
|
||||
.tab-content {
|
||||
--columns: 3;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Reference in a new issue