Skip to content

Commit

Permalink
fix: Make catalog card controllable (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
LautaroPetaccio authored Apr 8, 2024
1 parent e659e5e commit 35c5ea8
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions src/components/CatalogCard/CatalogCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import * as React from 'react'
import { storiesOf } from '@storybook/react'
import { Container } from '../Container/Container'
import { Header } from '../Header/Header'
import { HeaderMenu } from '../HeaderMenu/HeaderMenu'
import { ComponentMeta, ComponentStory } from '@storybook/react'
import { CatalogCard, CatalogCardProps } from './CatalogCard'
import { Rarity, Network } from '@dcl/schemas'
export default {
title: 'CatalogCard',
component: CatalogCard
} as ComponentMeta<typeof CatalogCard>

const i18n = {
rarities: Rarity.getRarities().reduce((acc, rarity) => {
Expand Down Expand Up @@ -37,15 +38,9 @@ const props: CatalogCardProps = {
i18n
}

storiesOf('CatalogCard', module).add('Catalog', () => (
<Container>
<HeaderMenu>
<HeaderMenu.Left>
<Header>Asset Cards for Catalog Items</Header>
</HeaderMenu.Left>
</HeaderMenu>
<div>
<CatalogCard {...props} />
</div>
</Container>
))
const Template: ComponentStory<typeof CatalogCard> = (args) => (
<CatalogCard {...args} />
)

export const Wearable = Template.bind({})
Wearable.args = props

0 comments on commit 35c5ea8

Please sign in to comment.