-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b1d35b
commit f41ed13
Showing
5 changed files
with
155 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import React from 'react'; | ||
|
||
import {Meta, StoryFn} from '@storybook/react'; | ||
|
||
import {CardLayoutBlock} from '../../blocks'; | ||
import {PageConstructor} from '../../containers/PageConstructor'; | ||
import {CardLayoutBlockModel, CardLayoutBlockProps} from '../../models'; | ||
import {block} from '../../utils'; | ||
|
||
import data from './data.json'; | ||
|
||
import './Indents.stories.scss'; | ||
|
||
export default { | ||
title: 'Block Indents/Sizes', | ||
component: CardLayoutBlock, | ||
} as Meta; | ||
|
||
const b = block('indents-wrapper'); | ||
|
||
const Template: StoryFn<CardLayoutBlockModel> = (args) => ( | ||
<div className={b()}> | ||
<PageConstructor | ||
content={{ | ||
blocks: [{...args}], | ||
}} | ||
/> | ||
</div> | ||
); | ||
|
||
export const Zero = Template.bind({}); | ||
export const XS = Template.bind({}); | ||
export const S = Template.bind({}); | ||
export const M = Template.bind({}); | ||
export const L = Template.bind({}); | ||
export const XL = Template.bind({}); | ||
|
||
Zero.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with zero indents at the top and bottom', | ||
indent: { | ||
top: '0', | ||
bottom: '0', | ||
}, | ||
} as CardLayoutBlockProps; | ||
|
||
XS.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with XS indents at the top and bottom', | ||
indent: { | ||
top: 'xs', | ||
bottom: 'xs', | ||
}, | ||
} as CardLayoutBlockProps; | ||
|
||
S.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with S indents at the top and bottom', | ||
indent: { | ||
top: 's', | ||
bottom: 's', | ||
}, | ||
} as CardLayoutBlockProps; | ||
|
||
M.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with M indents at the top and bottom', | ||
indent: { | ||
top: 'm', | ||
bottom: 'm', | ||
}, | ||
} as CardLayoutBlockProps; | ||
|
||
L.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with L (default) indents at the top and bottom', | ||
indent: { | ||
top: 'l', | ||
bottom: 'l', | ||
}, | ||
} as CardLayoutBlockProps; | ||
|
||
XL.args = { | ||
...data.default, | ||
title: 'Card layout with layout items with XL indents at the top and bottom', | ||
indent: { | ||
top: 'xl', | ||
bottom: 'xl', | ||
}, | ||
} as CardLayoutBlockProps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"default": { | ||
"type": "card-layout-block", | ||
"description": "Three cards in a row on the desktop, two cards in a row on a tablet, one card in a row on a mobile phone.", | ||
"children": [ | ||
{ | ||
"type": "layout-item", | ||
"media": { | ||
"dark": { | ||
"image": "/story-assets/img-mini_4-12_dark.png" | ||
}, | ||
"light": { | ||
"image": "/story-assets/img-mini_4-12_light.png" | ||
} | ||
}, | ||
"content": { | ||
"title": "Tell a story and build a narrative", | ||
"text": "We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future." | ||
} | ||
}, | ||
{ | ||
"type": "layout-item", | ||
"media": { | ||
"dark": { | ||
"image": "/story-assets/img-mini_4-12_dark.png" | ||
}, | ||
"light": { | ||
"image": "/story-assets/img-mini_4-12_light.png" | ||
} | ||
}, | ||
"content": { | ||
"title": "Tell a story and build a narrative", | ||
"text": "We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future." | ||
} | ||
}, | ||
{ | ||
"type": "layout-item", | ||
"media": { | ||
"dark": { | ||
"image": "/story-assets/img-mini_4-12_dark.png" | ||
}, | ||
"light": { | ||
"image": "/story-assets/img-mini_4-12_light.png" | ||
} | ||
}, | ||
"content": { | ||
"title": "Tell a story and build a narrative", | ||
"text": "We are all storytellers. Stories are a powerful way to communicate ideas and share information. The right story can lead to a better understanding of a situation, make us laugh, or even inspire us to do something in the future." | ||
} | ||
} | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.