You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently trying to build a UI Library that's built on top of Material-Ui V1. I want our developers to be able to reference the component code from Storybook.
This is an example of what I'd like to be able to see in Storybook (the full component file with dependencies):
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Button from '@material-ui/core/Button';
function PrimaryButton(props) {
const { classes } = props;
return (
<Button
variant="contained"
>
Primary Button
</Button>
);
}
PrimaryButton.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(PrimaryButton);
I've implemented @storybook/addon-storysource and @storybook/addon-info. They are great features, but they don't work for our use-case. They can't see past the Material-UI layer, and if it did it would only be the part of the component that's rendered.
I'm currently trying to build a UI Library that's built on top of Material-Ui V1. I want our developers to be able to reference the component code from Storybook.
This is an example of what I'd like to be able to see in Storybook (the full component file with dependencies):
I've implemented @storybook/addon-storysource and @storybook/addon-info. They are great features, but they don't work for our use-case. They can't see past the Material-UI layer, and if it did it would only be the part of the component that's rendered.
This is the output from addon-info:
Are there any recommended ways of displaying the full source code? Thanks in advance for any guidance you can provide.
The text was updated successfully, but these errors were encountered: