💄 Display horizontally in wide mode

This commit is contained in:
Alicia Sykes 2021-12-29 12:50:51 +00:00
parent 5684bf06e8
commit 9933766adf
2 changed files with 18 additions and 1 deletions

View File

@ -57,7 +57,9 @@
:itemSize="itemSize"
/>
</div>
<div v-else-if="sectionType === 'widget'">
<div
v-else-if="sectionType === 'widget'"
:class="`widget-list ${isWide? 'wide' : ''}`">
<WidgetBase
v-for="(widget, widgetIndx) in widgets"
:key="widgetIndx"
@ -119,6 +121,7 @@ export default {
items: Array,
widgets: Array,
index: Number,
isWide: Boolean,
},
components: {
Collapsable,
@ -345,4 +348,17 @@ export default {
border-style: dashed;
}
}
.widget-list {
&.wide {
display: flex;
align-items: flex-start;
justify-content: space-around;
.widget-base {
min-width: 10rem;
width: -webkit-fill-available;
}
}
}
</style>

View File

@ -41,6 +41,7 @@
:itemSize="itemSizeBound"
@itemClicked="finishedSearching()"
@change-modal-visibility="updateModalVisibility"
:isWide="!!singleSectionView || layoutOrientation === 'horizontal'"
:class="
(searchValue && filterTiles(section.items, searchValue).length === 0) ? 'no-results' : ''"
/>