diff --git a/.gatsby-context.js b/.gatsby-context.js
new file mode 100644
index 000000000000..9922bb09fa9c
--- /dev/null
+++ b/.gatsby-context.js
@@ -0,0 +1,15 @@
+'use strict';
+
+/* weak */
+// This file is auto-written and used by Gatsby to require
+// files from your pages directory.
+module.exports = function (callback) {
+ var context = require.context('./pages', true, /(coffee|cjsx|ts|tsx|jsx|js|md|rmd|mkdn?|mdwn|mdown|markdown|litcoffee|ipynb|html|json|yaml|toml)$/); // eslint-disable-line
+ if (module.hot) {
+ module.hot.accept(context.id, function () {
+ context = require.context('./pages', true, /(coffee|cjsx|ts|tsx|jsx|js|md|rmd|mkdn?|mdwn|mdown|markdown|litcoffee|ipynb|html|json|yaml|toml)$/); // eslint-disable-line
+ return callback(context);
+ });
+ }
+ return callback(context);
+};
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 1b6241f1f98f..d5b66fb82978 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@ dist
build
packages/examples/automated-*
yarn.lock
+public
diff --git a/.storybook/addons.js b/.storybook/addons.js
index f782d05c1b5e..c09a470411dc 100644
--- a/.storybook/addons.js
+++ b/.storybook/addons.js
@@ -1,3 +1 @@
-import { register } from './notes_addon';
-register();
require('@kadira/storybook/addons');
diff --git a/.storybook/config.js b/.storybook/config.js
index 7bffa1dfcee3..344badfc98e6 100644
--- a/.storybook/config.js
+++ b/.storybook/config.js
@@ -1,9 +1,10 @@
import { configure } from '@kadira/storybook';
+
import 'bootstrap/dist/css/bootstrap.css';
-import '../src/index.css';
+import '../css/main.css';
function loadStories() {
- require('../src/stories');
+ require('../stories')
}
configure(loadStories, module);
diff --git a/.storybook/notes_addon.js b/.storybook/notes_addon.js
deleted file mode 100644
index 9f2329163082..000000000000
--- a/.storybook/notes_addon.js
+++ /dev/null
@@ -1,78 +0,0 @@
-import React from 'react';
-import addons from '@kadira/storybook-addons';
-
-const styles = {
- notesPanel: {
- margin: 10,
- fontFamily: '-apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif',
- fontSize: 14,
- color: '#444',
- width: '100%',
- overflow: 'auto',
- }
-};
-
-export class WithNote extends React.Component {
- render() {
- const { children, note } = this.props;
- // This is to make sure, we'll always call this at the end of the eventloop.
- // So we know that, panel will get cleared, before we render the note.
- setTimeout(() => {
- addons.getChannel().emit('kadira/notes/add_note', note);
- }, 0);
- return children;
- }
-}
-
-class Notes extends React.Component {
- constructor(...args) {
- super(...args);
- this.state = {text: ''};
- this.onAddNote = this.onAddNote.bind(this);
- }
-
- onAddNote(text) {
- this.setState({text});
- }
-
- componentDidMount() {
- const { channel, api } = this.props;
- channel.on('kadira/notes/add_note', this.onAddNote);
-
- this.stopListeningOnStory = api.onStory(() => {
- this.setState({text: ''});
- });
- }
-
- componentWillUnmount() {
- if(this.stopListeningOnStory) {
- this.stopListeningOnStory();
- }
-
- this.unmounted = true;
- const { channel, api } = this.props;
- channel.removeListener('kadira/notes/add_note', this.onAddNote);
- }
-
- render() {
- const { text } = this.state;
- const textAfterFormatted = text? text.trim().replace(/\n/g, '
') : "";
-
- return (
-
Built by Kadira
-