mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 02:21:48 +08:00
In 6.5 the `framework` config option was one of `react`, `angular`, etc. and included Webpack settings. In the 7.0, we’ve updated it so that these are now called `renderers`, and are builder-independent. Now, frameworks contain specific builder information, such as `cra` or `nextjs` (for specific app environments) or `react-webpack5` / `react-vite` (for custom apps). This fixes the `sb init` CLI command to use renderer-specific templates. I also call out some follow-up work to fix automigrations & telemetry
22 lines
516 B
JavaScript
22 lines
516 B
JavaScript
import { createElement } from 'rax';
|
|
|
|
import { Page } from './Page';
|
|
import * as HeaderStories from './Header.stories';
|
|
|
|
export default {
|
|
title: 'Example/Page',
|
|
};
|
|
|
|
const Template = (args) => <Page {...args} />;
|
|
|
|
export const LoggedIn = Template.bind({});
|
|
LoggedIn.args = {
|
|
// More on composing args: https://storybook.js.org/docs/rax/writing-stories/args#args-composition
|
|
...HeaderStories.LoggedIn.args,
|
|
};
|
|
|
|
export const LoggedOut = Template.bind({});
|
|
LoggedOut.args = {
|
|
...HeaderStories.LoggedOut.args,
|
|
};
|