Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support: Can i render an Angular-Component in a docs page without story? #12264

Closed
flobiber opened this issue Aug 26, 2020 · 3 comments
Closed

Comments

@flobiber
Copy link

I would like to create a component that reads all defined css-colors (var(--example-color)) and shows that like a color-palette.

For that scenario i would like to create a angular component that exactly does that.

I try to show that component like that:

import { Meta, Canvas, Preview, ColorPalette, ColorItem, Wrapper, Primary } from '@storybook/addon-docs/blocks';
import { ColorPaletteComponent } from './color-palette/color-palette.component';
import { moduleMetadata } from '@storybook/angular';


<Meta title="LIB / Colors" decorators="{[moduleMetadata({declarations:[ColorPaletteComponent]})]}" />

# Colors

Here you can see all colors.

<Preview>
  <color-palette></color-palette>
</Preview>

But it isn't rendering the content of the ColorPalette-Component.

Is it possible? Or which alternatives i have?

@shilman
Copy link
Member

shilman commented Aug 27, 2020

Currently the only way to render Angular examples in the docs page is using stories.

There are some other options for different frameworks, but until the community figures out inline rendering for Angular (#8153), stories are the only option

@stale
Copy link

stale bot commented Sep 20, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@shilman
Copy link
Member

shilman commented Jan 29, 2021

Great Caesar's ghost!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.19 containing PR #13525 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Jan 29, 2021
@stale stale bot removed the inactive label Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants