-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #966 from WPMedia/TMEDIA-263-chain-updates
TMEDIA-263 - Update all chains to be able to have a heading
- Loading branch information
Showing
19 changed files
with
563 additions
and
16 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,59 @@ | ||
import React from 'react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
import DoubleChain from './chains/double-chain/default'; | ||
|
||
export default { | ||
title: 'Chains/Double', | ||
decorators: [withKnobs], | ||
parameters: { | ||
// Set the viewports in Chromatic at a component level. | ||
chromatic: { viewports: [320, 740, 1200] }, | ||
}, | ||
}; | ||
|
||
const styles = { | ||
backgroundColor: 'rgb(240 240 240)', | ||
}; | ||
|
||
const Comp1 = () => <div style={styles}>1</div>; | ||
const Comp2 = () => <div style={styles}>2</div>; | ||
|
||
export const allColumns = () => { | ||
const customFields = { | ||
columnOne: 1, | ||
heading: 'Double Chain Heading', | ||
}; | ||
|
||
return ( | ||
<DoubleChain customFields={customFields}> | ||
<Comp1 /> | ||
<Comp2 /> | ||
</DoubleChain> | ||
); | ||
}; | ||
|
||
export const allColumnsNoTitle = () => { | ||
const customFields = { | ||
columnOne: 1, | ||
}; | ||
|
||
return ( | ||
<DoubleChain customFields={customFields}> | ||
<Comp1 /> | ||
<Comp2 /> | ||
</DoubleChain> | ||
); | ||
}; | ||
|
||
export const zeroColumns = () => { | ||
const customFields = { | ||
heading: 'Double Chain Heading', | ||
}; | ||
|
||
return ( | ||
<DoubleChain customFields={customFields}> | ||
<Comp1 /> | ||
<Comp2 /> | ||
</DoubleChain> | ||
); | ||
}; |
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
Oops, something went wrong.