(COMPONENT_NAME)
export const Basic = Template.bind({})
Basic.args = {
...presetContent
}
const getCardListItemElement = (iteration: number) => {
return {
_uid: `${iteration}`,
component: 'card_list_item',
image: getStorybookImageOnIteration(iteration),
title: 'Card-Title',
subtitle: 'Card-Subtitle',
description: 'This can be a longer description of a card.'
} as CardListItemStoryblok
}
const itemCount = 12
const items: CardListItemStoryblok[] = []
let counter = 0
function createItems() {
if (counter < itemCount) {
items.push(getCardListItemElement(counter))
counter++
createItems()
}
}
createItems()
const cardListBody: CardListItemStoryblok[] = items
const cardListLongDescription: CardListItemStoryblok[] = [
{
_uid: '123',
component: 'card_list_item',
title: 'Toll',
subtitle: 'SubTitle',
image:
'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png',
description:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
},
{
_uid: '123123',
component: 'card_list_item',
title: 'Toll',
subtitle: 'SubTitle',
description:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
image:
'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png'
},
{
_uid: '12321312',
component: 'card_list_item',
title: 'Toll',
subtitle: 'SubTitle',
description:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
image:
'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png'
},
{
_uid: '123213123',
component: 'card_list_item',
title: 'Toll',
subtitle: 'SubTitle',
description:
"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.",
image:
'https://a.storyblok.com/f/57008/5000x3334/bae4d23fcf/amsterdam-retouch.png'
}
]
const twitterPng =
'https://img2.storyblok.com/f/66717/273x256/42d8e47bd5/twitter-icon.png'
const fcbkPng = 'https://a.storyblok.com/f/66717/273x256/1af4758e5f/fb-icon.png'
const instaPng =
'https://img2.storyblok.com/f/66717/273x256/275fe57666/insta-icon.png'
const cardListIcons: CardListItemStoryblok[] = [
{
_uid: '123',
component: 'card_list_item',
image: instaPng
},
{
_uid: '123123',
component: 'card_list_item',
image: fcbkPng
},
{
_uid: '12321312',
component: 'card_list_item',
image: twitterPng
}
]
const cardList: CardListStoryblok = {
_uid: '12311',
component: 'card_list',
body: cardListBody
}
export const CardList = () =>
export const CardListOverImage = () => (
<>
>
)
export const CardListResponsive = () => (
<>
Some spacing
Some spacing
Some spacing
>
)
export const CardListCroppedDescription = () => (
<>
Only 120 character
No description with value 0
>
)
export const CardsOfTravels = () => {
const elements = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
return (
{
return {
_uid: `elem-${num}`,
component: 'card_list_item',
title: 'Card Title',
image: getStorybookImageOnIteration(num),
description: 'Some long description of a card.',
card_actions_body: [
{
_uid: 'asdfa',
component: 'flex_row',
justify: 'space-between',
align_items: 'center',
body: [
{
_uid: '123',
component: 'headline',
typography: 'body1',
text: 'Some Headline'
},
{
_uid: '12332',
component: 'headline',
typography: 'body2',
text: 'Another Headline'
}
] as HeadlineStoryblok[]
}
] as FlexRowStoryblok[]
} as CardListItemStoryblok
})
}}
/>
)
}
export const CardsCustomText = () => {
const elements = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
return (
{
return {
_uid: `elem-${num}`,
component: 'card_list_item',
title: `Card Title ${num}`,
image: getStorybookImageOnIteration(num),
subtitle: `Subtitle #${num}`,
description:
'Some long description of a card. This would go over multiple rows for sure and can be clamped',
card_actions_body: [
{
_uid: 'asdfa',
component: 'flex_row',
justify: 'space-between',
align_items: 'center',
body: [
{
_uid: '123',
component: 'headline',
typography: 'body1',
text: 'Some Headline'
},
{
_uid: '12332',
component: 'headline',
typography: 'body2',
text: 'Another Headline'
}
] as HeadlineStoryblok[]
}
] as FlexRowStoryblok[]
} as CardListItemStoryblok
})
}}
/>
)
}
export const CardIcons = () => (
<>
>
)
export const CardActions = () => (
<>
({
...cardItem,
action_headline: [
{
_uid: '543',
component: 'headline',
typography: 'headline5',
color: 'textSecondary',
text: `Some Sidebar Action`
} as HeadlineStoryblok
],
body: [
{
_uid: '543',
component: 'headline',
text: `Headline ${i}`
}
] as (HeadlineStoryblok | ParagraphStoryblok | ImageStoryblok)[]
}))
}}
/>
>
)