Add stories to reproduce #11586

This commit is contained in:
Tom Coleman 2020-07-20 12:29:02 +10:00
parent 1dad48483b
commit 36e5acf484

View File

@ -44,17 +44,25 @@ export default {
],
};
export const PassedToStory = (inputArgs) => {
const Template = (args) => {
return (
<div>
<h3>Input args:</h3>
<pre>{JSON.stringify(inputArgs)}</pre>
<pre>{JSON.stringify(args)}</pre>
</div>
);
};
export const PassedToStory = Template.bind({});
PassedToStory.argTypes = { name: { defaultValue: 'initial', control: 'text' } };
PassedToStory.propTypes = {
args: PropTypes.shape({}).isRequired,
export const OtherValues = Template.bind({});
OtherValues.argTypes = { name: { control: 'text' } };
export const DifferentSet = Template.bind({});
DifferentSet.args = {
foo: 'bar',
bar: 2,
};