-
Notifications
You must be signed in to change notification settings - Fork 22
/
HorizontalScroller.stories.tsx
63 lines (57 loc) · 1.51 KB
/
HorizontalScroller.stories.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import { ComponentMeta, ComponentStory } from '@storybook/react'
import { DaoCardProps } from '@dao-dao/types'
import { DaoCard } from './dao'
import { makeDaoCardProps } from './dao/DaoCard.stories'
import { HorizontalScroller } from './HorizontalScroller'
export default {
title: 'DAO DAO / packages / stateless / components / HorizontalScroller',
component: HorizontalScroller,
} as ComponentMeta<typeof HorizontalScroller>
const Template: ComponentStory<typeof HorizontalScroller<DaoCardProps>> = (
args
) => <HorizontalScroller {...args} />
export const FeaturedDaos = Template.bind({})
FeaturedDaos.args = {
Component: DaoCard,
items: {
loading: false,
data: [
makeDaoCardProps(),
{
...makeDaoCardProps(),
info: {
...makeDaoCardProps().info,
name: 'DAO DAO',
created: new Date('August 11, 2022 16:20:00').getTime(),
},
},
makeDaoCardProps(),
{
...makeDaoCardProps(),
info: {
...makeDaoCardProps().info,
name: 'DAO DAO',
created: Date.now(),
},
},
{
...makeDaoCardProps(),
info: {
...makeDaoCardProps().info,
name: 'A different DAO',
created: new Date('August 11, 2022 16:20:00').getTime(),
},
},
makeDaoCardProps(),
makeDaoCardProps(),
makeDaoCardProps(),
],
},
}
export const Loading = Template.bind({})
Loading.args = {
Component: DaoCard,
items: {
loading: true,
},
}