Add Feature Flags support to storybook (#2994)
This commit is contained in:
parent
931467a73a
commit
b88ee3c3b9
3 changed files with 6 additions and 19 deletions
|
@ -1,18 +0,0 @@
|
|||
import Decorator from "@dashboard/storybook/Decorator";
|
||||
import { storiesOf } from "@storybook/react";
|
||||
import React from "react";
|
||||
|
||||
import AppActivateDialog, { AppActivateDialogProps } from "./AppActivateDialog";
|
||||
|
||||
const props: AppActivateDialogProps = {
|
||||
confirmButtonState: "default",
|
||||
name: "App",
|
||||
onClose: () => undefined,
|
||||
onConfirm: () => undefined,
|
||||
open: true,
|
||||
};
|
||||
|
||||
storiesOf("Views / Apps / Activate app", module)
|
||||
.addDecorator(Decorator)
|
||||
.add("default", () => <AppActivateDialog {...props} />)
|
||||
.add("unnamed app", () => <AppActivateDialog {...props} name={null} />);
|
|
@ -10,7 +10,7 @@ const props: AppListPageProps = {
|
|||
installedApps: installedAppsList,
|
||||
};
|
||||
|
||||
storiesOf("Views / New Apps / App List", module)
|
||||
storiesOf("Apps / New Apps / App List", module)
|
||||
.addDecorator(Decorator)
|
||||
.add("default", () => <AppListPage {...props} />)
|
||||
.add("empty", () => (
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
const path = require("path");
|
||||
const CheckerPlugin = require("fork-ts-checker-webpack-plugin");
|
||||
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin");
|
||||
const webpack = require("webpack");
|
||||
|
||||
module.exports = ({ config }) => {
|
||||
config.module.rules.push({
|
||||
|
@ -35,6 +36,10 @@ module.exports = ({ config }) => {
|
|||
new CheckerPlugin({
|
||||
eslint: true,
|
||||
}),
|
||||
new webpack.DefinePlugin({
|
||||
FLAGS_SERVICE_ENABLED: false,
|
||||
FLAGS: {},
|
||||
}),
|
||||
);
|
||||
return config;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue