-
The ArgsTable in Storybook for HTML seems to only show up when I use CSF, but not with MDX. Am I doing something wrong? With MDX:import { ArgsTable, Canvas, Meta, Story } from '@storybook/addon-docs/blocks';
export const Template = ({ variant }) => {
return `
<div>${variant}</div>
`;
};
<Meta
title="Test"
argTypes={{
variant: {
control: {
type: 'inline-radio',
options: ['primary'],
},
},
}}
/>
# Test
<Canvas>
<Story name="test" args={{ variant: 'primary' }}>
{Template.bind({})}
</Story>
</Canvas>
## ArgsTable
<ArgsTable /> With CSF:export default {
title: 'Test CSF',
argTypes: {
variant: {
control: {
type: 'inline-radio',
options: ['primary'],
},
},
},
};
const Template = ({ variant }) => {
return `
<div>${variant}</div>
`;
};
export const Test = Template.bind({});
Test.args = {
variant: 'primary',
}; |
Beta Was this translation helpful? Give feedback.
Answered by
eMontielG
Oct 24, 2020
Replies: 1 comment 1 reply
-
Nevermind, found the issue. I wasn't setting the story prop in the ArgsTable, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
eMontielG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nevermind, found the issue. I wasn't setting the story prop in the ArgsTable,
<ArgsTable story="test" />
.