Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
AP-714 Use storybook docs (#81)
Browse files Browse the repository at this point in the history
AP-714 Use storybook docs
  • Loading branch information
Justin Anastos authored Sep 3, 2019
2 parents c19771e + 651567e commit 7aae7d9
Show file tree
Hide file tree
Showing 25 changed files with 3,778 additions and 2,511 deletions.
8 changes: 8 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
"prettier/flowtype",
"prettier/react",
"prettier/standard",
"plugin:mdx/recommended",
],
plugins: ["prettier", "react", "react-hooks"],
rules: {
Expand Down Expand Up @@ -76,6 +77,13 @@ module.exports = {
node: true,
},
},
{
files: ["*.mdx"],
extends: ["plugin:mdx/overrides"],
env: {
commonjs: true,
},
},
],
settings: {
react: {
Expand Down
1 change: 0 additions & 1 deletion .storybook/addons.js

This file was deleted.

32 changes: 14 additions & 18 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
import { configure } from "@storybook/react";

function importAll(r) {
r.keys().forEach(r);
}

function loadStories() {
importAll(
require.context("../src", true, /\.(?:stories|story)\.(jsx?|tsx?)$/)
);
import "../reset.css";
import "../font.css";

importAll(
require.context("../stories", true, /\.(?:stories|story)\.(jsx?|tsx?)$/)
);

require("../reset.css");
require("../font.css");
}
import { configure } from "@storybook/react";

configure(loadStories, module);
configure(
[
require.context("../src", true, /\.(?:stories|story)\.(jsx?|tsx?|mdx)$/),
require.context(
"../stories",
true,
/\.(?:stories|story)\.(jsx?|tsx?|mdx)$/
),
],
module
);
19 changes: 19 additions & 0 deletions .storybook/presets.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require("path");

module.exports = [
{
name: "@storybook/preset-typescript",
options: {
tsLoaderOptions: {
transpileOnly: true,
},
tsDocgenLoaderOptions: {
// Specify this manually or the loader won't find the config. See
// https://github.com/strothj/react-docgen-typescript-loader/issues/10
tsconfigPath: path.resolve(__dirname, "../tsconfig.json"),
},
},
},
"@storybook/addon-docs/react/preset",
];
22 changes: 0 additions & 22 deletions .storybook/webpack.config.js

This file was deleted.

Loading

0 comments on commit 7aae7d9

Please sign in to comment.