forked from jd-solanki/anu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(loader): simplified loading in components
- Loading branch information
1 parent
024f90e
commit 908f038
Showing
33 changed files
with
6,926 additions
and
10,363 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,156 @@ | ||
<script lang="ts" setup> | ||
import { onMounted, ref } from 'vue' | ||
const loading = ref(true) | ||
onMounted(() => { | ||
setTimeout(() => { | ||
loading.value = false | ||
}, 5000) | ||
}) | ||
</script> | ||
|
||
<template> | ||
<ABtn>Button</ABtn> | ||
<div class="flex flex-wrap gap-6"> | ||
<!-- Alert --> | ||
<AAlert | ||
color="info" | ||
class="relative" | ||
> | ||
Fruitcake I love liquorice apple pie croissant. | ||
<ALoader | ||
:loading="loading" | ||
class="text-2xl" | ||
/> | ||
</AAlert> | ||
<AAlert | ||
color="info" | ||
variant="fill" | ||
class="relative" | ||
> | ||
Fruitcake I love liquorice apple pie croissant. | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="text-2xl" | ||
/> | ||
</AAlert> | ||
<AAlert | ||
color="info" | ||
variant="outline" | ||
class="relative" | ||
> | ||
Fruitcake I love liquorice apple pie croissant. | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="text-2xl bg-white dark:bg-dark" | ||
/> | ||
</AAlert> | ||
<AAlert | ||
color="info" | ||
variant="text" | ||
class="relative" | ||
> | ||
Fruitcake I love liquorice apple pie croissant. | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="text-2xl bg-light dark:bg-dark" | ||
/> | ||
</AAlert> | ||
|
||
<!-- Card --> | ||
<ACard | ||
variant="fill" | ||
color="danger" | ||
title="Card title" | ||
subtitle="Chocolate cake tiramisu donut" | ||
> | ||
<div class="a-card-body a-card-spacer"> | ||
<p class="text-sm"> | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="text-3xl" | ||
title="It's loading..." | ||
subtitle="Click to stop loading." | ||
/> | ||
Ice cream sweet pie pie dessert sweet danish. Jelly jelly beans cupcake jelly-o chocolate bonbon chocolate | ||
bar. | ||
</p> | ||
</div> | ||
</ACard> | ||
|
||
<ACard | ||
variant="light" | ||
color="danger" | ||
> | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="text-3xl" | ||
title="It's loading..." | ||
subtitle="Click to stop loading." | ||
/> | ||
<div class="a-card-body a-card-spacer"> | ||
<ATypography | ||
title="Card title" | ||
subtitle="Chocolate cake tiramisu donut" | ||
/> | ||
<p class="text-sm"> | ||
Ice cream sweet pie pie dessert sweet danish. Jelly jelly beans cupcake jelly-o chocolate bonbon chocolate | ||
bar. | ||
</p> | ||
</div> | ||
</ACard> | ||
|
||
<div class="flex gap-x-2"> | ||
<AChip | ||
variant="fill" | ||
class="relative" | ||
> | ||
Primary | ||
<ALoader | ||
:loading="loading" | ||
/> | ||
</AChip> | ||
<AChip class="relative"> | ||
Primary | ||
<ALoader | ||
:loading="loading" | ||
/> | ||
</AChip> | ||
<AChip | ||
variant="outline" | ||
class="relative" | ||
> | ||
Primary | ||
<ALoader | ||
:loading="loading" | ||
|
||
class="bg-white dark:bg-dark" | ||
/> | ||
</AChip> | ||
<AChip | ||
variant="text" | ||
class="relative" | ||
> | ||
Primary | ||
<ALoader | ||
:loading="loading" | ||
class="bg-light dark:bg-dark" | ||
/> | ||
</AChip> | ||
</div> | ||
|
||
<div class="w-full flex gap-6"> | ||
<ABtn | ||
:loading="loading" | ||
variant="fill" | ||
> | ||
Button | ||
</ABtn> | ||
</div> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.