feat(Loader): create loader component with spinner and optional message
This commit is contained in:
33
src/shared/ui/Loader/Loader.stories.svelte
Normal file
33
src/shared/ui/Loader/Loader.stories.svelte
Normal file
@@ -0,0 +1,33 @@
|
||||
<script module>
|
||||
import { defineMeta } from '@storybook/addon-svelte-csf';
|
||||
import Loader from './Loader.svelte';
|
||||
|
||||
const { Story } = defineMeta({
|
||||
title: 'Shared/Loader',
|
||||
tags: ['autodocs'],
|
||||
parameters: {
|
||||
docs: {
|
||||
description: {
|
||||
component: 'Spinner with optional message',
|
||||
},
|
||||
story: { inline: false }, // Render stories in iframe for state isolation
|
||||
},
|
||||
},
|
||||
argTypes: {
|
||||
message: {
|
||||
control: 'text',
|
||||
description: 'Optional message to display',
|
||||
defaultValue: 'analyzing_data',
|
||||
},
|
||||
size: {
|
||||
control: 'number',
|
||||
description: 'Size of the spinner',
|
||||
defaultValue: 20,
|
||||
},
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
<Story name="Default">
|
||||
<Loader />
|
||||
</Story>
|
||||
Reference in New Issue
Block a user