mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 12:31:06 +08:00
Somehow missed this
This commit is contained in:
parent
06c58d9d6e
commit
66e226e9eb
7
app/angular/preset.js
vendored
Normal file
7
app/angular/preset.js
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
function config(entry = []) {
|
||||
return [...entry, require.resolve('./dist/esm/client/preview/config')];
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
config,
|
||||
};
|
3
app/angular/src/client/preview/config.ts
Normal file
3
app/angular/src/client/preview/config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export { render, renderToDOM } from './render';
|
||||
|
||||
export const parameters = { framework: 'angular' };
|
@ -2,10 +2,10 @@
|
||||
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
||||
import { start } from '@storybook/core/client';
|
||||
import './globals';
|
||||
import renderToDOM from './render';
|
||||
import { renderToDOM, render } from './render';
|
||||
import decorateStory from './decorateStory';
|
||||
import { IStorybookSection } from './types';
|
||||
import { AngularFramework, Story } from './types-6-0';
|
||||
import { AngularFramework } from './types-6-0';
|
||||
|
||||
const framework = 'angular';
|
||||
|
||||
@ -19,7 +19,6 @@ interface ClientApi extends ClientStoryApi<AngularFramework['storyResult']> {
|
||||
load: (...args: any[]) => void;
|
||||
}
|
||||
|
||||
const render: Story = (props) => ({ props });
|
||||
const api = start(renderToDOM, { decorateStory, render });
|
||||
|
||||
export const storiesOf: ClientApi['storiesOf'] = (kind, m) => {
|
||||
|
@ -1,4 +1,5 @@
|
||||
import { RenderContext } from '@storybook/store';
|
||||
import { ArgsStoryFn } from '@storybook/csf';
|
||||
|
||||
import { renderNgApp } from './angular/helpers';
|
||||
import { AngularFramework } from './types-6-0';
|
||||
@ -7,7 +8,9 @@ import { RendererFactory } from './angular-beta/RendererFactory';
|
||||
|
||||
export const rendererFactory = new RendererFactory();
|
||||
|
||||
export default async function renderMain(
|
||||
export const render: ArgsStoryFn<AngularFramework> = (props) => ({ props });
|
||||
|
||||
export async function renderToDOM(
|
||||
{
|
||||
storyFn,
|
||||
showMain,
|
||||
|
Loading…
x
Reference in New Issue
Block a user