Skip to content

Commit

Permalink
stories created
Browse files Browse the repository at this point in the history
  • Loading branch information
danilo-89 committed Mar 29, 2024
1 parent 72c4647 commit 4bf2e88
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 0 deletions.
28 changes: 28 additions & 0 deletions stories/InfoMessageWrapper.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import type { Meta, StoryObj } from '@storybook/react'

// Components
import InfoMessageWrapper from '@/components/sections/SectionMint/InfoMessageWrapper'

const meta = {
title: 'InfoMessageWrapper',
component: InfoMessageWrapper,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {},
args: {
isActionRequired: true,
isError: false,
isLoading: false,
isMetadataLoading: false,
isSuccess: false,
children:
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt magni repellendus blanditiis iusto. Fugiat, quos.',
},
} satisfies Meta<typeof InfoMessageWrapper>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {}
20 changes: 20 additions & 0 deletions stories/LoaderDots.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Meta, StoryObj } from '@storybook/react'

// Components
import LoaderDots from '../components/common/LoaderDots'

const meta = {
title: 'Loaders/LoaderDots',
component: LoaderDots,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {},
args: {},
} satisfies Meta<typeof LoaderDots>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {}
20 changes: 20 additions & 0 deletions stories/LoaderSquare.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import type { Meta, StoryObj } from '@storybook/react'

// Components
import LoaderSquare from '../components/common/LoaderSquare'

const meta = {
title: 'Loaders/LoaderSquare',
component: LoaderSquare,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {},
args: {},
} satisfies Meta<typeof LoaderSquare>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {}
59 changes: 59 additions & 0 deletions stories/NFTCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import type { Meta, StoryObj } from '@storybook/react'
import { useArgs } from '@storybook/preview-api'

// Components
import NftCard from '@/components/NftCard'
import Button from '@/components/common/Button'

// Sample data
import { nftCardData } from './sampleData'

const meta = {
title: 'NftCard',
component: NftCard,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {},
args: {
data: nftCardData,
},
} satisfies Meta<typeof NftCard>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {}

export const TestFlip: Story = {
args: {},
decorators: [
(Story) => {
const [args, updateArgs] = useArgs()

return (
<>
<div className="flex justify-center py-5">
<Button
type="button"
variation="transparent"
onClick={() =>
updateArgs({
data: { ...nftCardData },
})
}
>
flip it
</Button>
</div>
<Story
args={{
...args,
}}
/>
</>
)
},
],
}
24 changes: 24 additions & 0 deletions stories/Title.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import type { Meta, StoryObj } from '@storybook/react'

// Components
import Title from '../components/common/Title'

const meta = {
title: 'Title',
component: Title,
parameters: {
layout: 'centered',
},
tags: ['autodocs'],
argTypes: {},
args: {
title: 'Lorem Ipsum',
children:
'Lorem ipsum dolor sit amet consectetur adipisicing elit. Sunt magni repellendus blanditiis iusto. Fugiat, quos.',
},
} satisfies Meta<typeof Title>

export default meta
type Story = StoryObj<typeof meta>

export const Default: Story = {}

0 comments on commit 4bf2e88

Please sign in to comment.