Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

question about customization of page layout? #94

Open
dgreene1 opened this issue Apr 11, 2020 · 1 comment
Open

question about customization of page layout? #94

dgreene1 opened this issue Apr 11, 2020 · 1 comment

Comments

@dgreene1
Copy link

dgreene1 commented Apr 11, 2020

It would be great to be able to layout the docs page for components differently.

For instance, if we could show all of the stories for a given component on the same page that would be ideal.

I did see something akin to this in the storybook PRs, but I'm not sure that we have access to it when using this loader. Or perhaps the subcomponents parameter might be another way of achieving this?

@dgreene1
Copy link
Author

Update: I still can't find how to configure this for react-docgen-typescript-loader; however, for CSF it's pretty easy to do:

import {
    Title,
    Subtitle,
    Description,
    Primary,
    Props,
    Stories,
  } from '@storybook/addon-docs/blocks';

const kind: KindMeta<typeof VtxButton> = {
    title: 'Components/Button',
    component: VtxButton,
    parameters: {
        info: { inline: true },
        docs: {
            page: () => {
                const pageComponents = (
                    <>
                        <Title />
                        <Subtitle />
                        <Description />
                        <Primary />
                        <Stories />
                        <Props />
                    </>
                );
            
                return pageComponents;
            },
        },
    },
};

However, there seems to be a few issues related to CSF not being able to find the source and or props. So that's why I'm leaning towards the component version that we have here.

But it would be great if we had some control over the page here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant