Somehow missed this

This commit is contained in:
Tom Coleman 2021-09-11 16:28:21 +10:00
parent 06c58d9d6e
commit 66e226e9eb
4 changed files with 16 additions and 4 deletions

7
app/angular/preset.js vendored Normal file
View File

@ -0,0 +1,7 @@
function config(entry = []) {
return [...entry, require.resolve('./dist/esm/client/preview/config')];
}
module.exports = {
config,
};

View File

@ -0,0 +1,3 @@
export { render, renderToDOM } from './render';
export const parameters = { framework: 'angular' };

View File

@ -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) => {

View File

@ -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,