11import type { Meta , StoryObj } from '@storybook/react' ;
22
3- import LoaderSpinner from '../LoaderSpinner ' ;
3+ import Spinner from '../Spinner ' ;
44
55const meta = {
6- title : 'Common/Loader/LoaderSpinner ' ,
7- component : LoaderSpinner ,
6+ title : 'Common/Loader/Spinner ' ,
7+ component : Spinner ,
88 parameters : {
99 layout : 'centered' ,
1010 } ,
1111 tags : [ 'autodocs' ] ,
1212 argTypes : {
13+ children : { description : 'Optional. The content, e.g. "Spinner.Text".' } ,
1314 className : { description : 'Additional CSS classes.' } ,
14- icon : { description : 'Optional. The icon name.' } ,
15- iconClassName : { description : 'Optional. CSS class names for the icon.' } ,
15+ icon : { description : 'Optional. A "FAIconProps" object containing properties for the icon.' } ,
1616 testId : { description : 'The test identifier.' } ,
17- text : { description : 'Optional. The loader text.' } ,
18- textClassName : { description : 'Optional. CSS class names for the text.' } ,
1917 } ,
20- } satisfies Meta < typeof LoaderSpinner > ;
18+ } satisfies Meta < typeof Spinner > ;
2119
2220export default meta ;
2321
@@ -29,24 +27,24 @@ export const Simple: Story = {
2927
3028export const Larger : Story = {
3129 args : {
32- iconClassName : 'text-2xl' ,
30+ icon : { size : '2x' } ,
3331 } ,
3432} ;
3533
3634export const Colored : Story = {
3735 args : {
38- iconClassName : 'text-blue-600' ,
36+ icon : { className : 'text-blue-600' } ,
3937 } ,
4038} ;
4139
4240export const WithText : Story = {
4341 args : {
44- text : ' Engaging warp engines Captain...' ,
42+ children : < Spinner . Text > Engaging warp engines Captain...</ Spinner . Text > ,
4543 } ,
4644} ;
4745
4846export const WithAlternativeIcon : Story = {
4947 args : {
50- icon : 'circleXmark' ,
48+ icon : { icon : 'circleXmark' } ,
5149 } ,
5250} ;
0 commit comments