Skip to content

Commit

Permalink
Changes on renderer public api.
Browse files Browse the repository at this point in the history
  • Loading branch information
webblocksapp committed Mar 25, 2023
1 parent 43f4c10 commit 973e0c5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/renderers/solid/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { parameters as docsParams } from './docs/config';

export const parameters = { framework: 'solid', ...docsParams };
export const parameters = { renderer: 'solid', ...docsParams };

export { argTypesEnhancers } from './docs/config';
export { renderToCanvas, render } from './render';
export { render, renderToCanvas } from './render';
export { allDecorators as decorators, applyDecorators } from './decorators';
11 changes: 7 additions & 4 deletions packages/renderers/solid/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@ interface ClientApi extends Addon_ClientStoryApi<SolidRenderer['storyResult']> {
forceReRender(): void;
raw: () => any; // todo add type
}
const FRAMEWORK = 'solid';
const RENDERER = 'solid';

const api = start<SolidRenderer>(renderToCanvas, { render });

export const storiesOf: ClientApi['storiesOf'] = (kind, m) => {
return (api.clientApi.storiesOf(kind, m) as ReturnType<ClientApi['storiesOf']>).addParameters({
framework: FRAMEWORK,
return (
api.clientApi.storiesOf(kind, m) as ReturnType<ClientApi['storiesOf']>
).addParameters({
renderer: RENDERER,
});
};

export const configure: ClientApi['configure'] = (...args) => api.configure(FRAMEWORK, ...args);
export const configure: ClientApi['configure'] = (...args) =>
api.configure(RENDERER, ...args);
export const forceReRender: ClientApi['forceReRender'] = api.forceReRender;
export const raw: ClientApi['raw'] = api.clientApi.raw;

0 comments on commit 973e0c5

Please sign in to comment.