Skip to content

Commit

Permalink
Доработан прелоадер: Добавлена возможность центрирования с помощью пе…
Browse files Browse the repository at this point in the history
…редачи свойства centered
  • Loading branch information
simba77 committed May 31, 2024
1 parent b75715a commit 6f24ab4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 7 additions & 1 deletion resources/admin/components/Common/PreloaderComponent.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<script setup lang="ts">
defineProps<{ centered?: boolean }>()
</script>

<template>
<div class="spinner-border" role="status">
<div v-if="centered" class="text-center">
<div class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</div>
<div v-else class="spinner-border" role="status">
<span class="visually-hidden">Loading...</span>
</div>
</template>
5 changes: 2 additions & 3 deletions resources/admin/pages/Users/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ getUsers()

<template>
<admin-page-layout>
<preloader-component v-if="loading" />
<div v-if="filterOptions" class="filter row mb-3">
<div class="col-4">
<input-text-component
Expand Down Expand Up @@ -91,8 +90,8 @@ getUsers()
</button>
</div>
</div>

<table v-if="pageData" class="table simple-table table-hover table-borderless">
<preloader-component v-if="loading" class="mt-5" centered />
<table v-if="pageData && !loading" class="table simple-table table-hover table-borderless">
<thead>
<tr class="border-bottom">
<th>#</th>
Expand Down

0 comments on commit 6f24ab4

Please sign in to comment.