feat: Add Spinner to new components (#10303)

- Add Spinner to new components
This commit is contained in:
Pranav
2024-10-16 17:53:46 -07:00
committed by GitHub
parent 306a6c6ce0
commit 35b21c1cea
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
<script setup>
import Spinner from './Spinner.vue';
</script>
<template>
<Story title="Components/Spinner" :layout="{ type: 'grid', width: '400' }">
<Variant title="Default">
<Spinner size="24" class="text-n-slate-10" />
<Spinner size="32" class="text-n-ruby-10" />
<Spinner size="40" class="text-n-amber-10" />
<Spinner size="48" class="text-n-teal-10" />
<Spinner size="64" class="text-n-brand" />
</Variant>
</Story>
</template>

View File

@@ -0,0 +1,25 @@
<script setup>
defineProps({
size: {
type: Number,
default: 24,
},
});
</script>
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
:width="size"
:height="size"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="8"
strokeLinecap="round"
strokeLinejoin="round"
class="animate-spin"
>
<path d="M21 12a9 9 0 1 1-6.219-8.56" />
</svg>
</template>