Skip to content

Commit

Permalink
Additional wrapping divs to avoid spacing sub content
Browse files Browse the repository at this point in the history
Signed-off-by: John Cowen <[email protected]>
  • Loading branch information
johncowen committed Oct 24, 2024
1 parent 8204724 commit fa3f89e
Showing 1 changed file with 33 additions and 29 deletions.
62 changes: 33 additions & 29 deletions src/app/application/components/data-collection/DataCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,35 @@
<template
v-if="slots.item"
>
<template
v-for="item in [props.items.find(props.predicate)]"
:key="item"
>
<slot
v-if="item"
name="item"
:item="item as T"
/>
<div>
<template
v-for="item in [props.items.find(props.predicate)]"
:key="item"
>
<slot
v-if="item"
name="item"
:item="item as T"
/>
<slot
v-else
name="empty"
:items="items"
>
<XEmptyState
v-if="props.empty"
:type="props.type"
/>
</slot>
</template>
</div>
</template>
<template
v-else
>
<div>
<slot
v-else
v-if="items.length === 0"
name="empty"
:items="items"
>
Expand All @@ -24,26 +42,12 @@
:type="props.type"
/>
</slot>
</template>
</template>
<template
v-else
>
<slot
v-if="items.length === 0"
name="empty"
:items="items"
>
<XEmptyState
v-if="props.empty"
:type="props.type"
<slot
v-else
name="default"
:items="paginated"
/>
</slot>
<slot
v-else
name="default"
:items="paginated"
/>
</div>
<slot
v-if="typeof props.items?.[0] !== 'undefined' && !(props.page === 0 && props.pageSize === 0 && props.total === 0)"
name="pagination"
Expand Down

0 comments on commit fa3f89e

Please sign in to comment.