Skip to content

Commit

Permalink
Merge pull request #34 from damiano-carradori/ISSUE-31-add-storybook
Browse files Browse the repository at this point in the history
Issue 31 add storybook
  • Loading branch information
damiano-carradori committed Mar 9, 2019
2 parents 60a4401 + a47fc49 commit d7083ec
Show file tree
Hide file tree
Showing 30 changed files with 6,189 additions and 316 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# ide
/.idea

.npmignore
npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/src
/.storybook
/docs
9 changes: 9 additions & 0 deletions .storybook/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { configure } from '@storybook/react';

const req = require.context('../src', true, /story.js$/);

function loadStories() {
req.keys().forEach(filename => req(filename));
}

configure(loadStories, module);
Binary file added docs/favicon.ico
Binary file not shown.
61 changes: 61 additions & 0 deletions docs/iframe.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><meta name="viewport" content="width=device-width,initial-scale=1"><base target="_parent"><style>:not(.sb-show-main) > .sb-main,
:not(.sb-show-nopreview) > .sb-nopreview,
:not(.sb-show-errordisplay) > .sb-errordisplay {
display: none;
}

.sb-wrapper {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
padding: 20px;
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", Roboto, "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
-webkit-font-smoothing: antialiased;
}

.sb-heading {
font-size: 20px;
font-weight: 600;
letter-spacing: 0.2px;
margin: 10px 0;
}

.sb-nopreview {
display: flex;
align-content: center;
justify-content: center;
}

.sb-nopreview_main {
margin: auto;
padding: 30px;
border-radius: 10px;
background: rgba(0,0,0,0.03);
}

.sb-nopreview_heading {
text-align: center;
}

.sb-errordisplay {
background-color: rgb(187, 49, 49);
color: #FFF;
}

.sb-errordisplay_code {
font-size: 14px;
width: 100vw;
overflow: auto;
}</style><script>/* globals window */
/* eslint-disable no-underscore-dangle */
try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
// eslint-disable-next-line no-console
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div class="sb-nopreview sb-wrapper"><div class="sb-nopreview_main"><h1 class="sb-nopreview_heading sb-heading">No Preview</h1><p>Sorry, but you either have no stories or none are selected somehow.</p><ul><li>Please check the Storybook config.</li><li>Try reloading the page.</li></ul><p>If the problem persists, check the browser console, or the terminal you've run Storybook from.</p></div></div><div class="sb-errordisplay sb-wrapper"><div id="error-message" class="sb-heading"></div><pre class="sb-errordisplay_code"><code id="error-stack"></code></pre></div><div id="root"></div><script src="runtime~main.04b16c49788466b13fd9.bundle.js"></script><script src="vendors~main.04b16c49788466b13fd9.bundle.js"></script><script src="main.04b16c49788466b13fd9.bundle.js"></script></body></html>
17 changes: 17 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html><html><head><meta charset="utf-8"><title>Storybook</title><meta name="viewport" content="width=device-width,initial-scale=1"><style>html, body {
overflow: hidden;
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}</style><script>/* globals window */
/* eslint-disable no-underscore-dangle */
try {
if (window.parent !== window) {
window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;
window.__VUE_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__VUE_DEVTOOLS_GLOBAL_HOOK__;
}
} catch (e) {
// eslint-disable-next-line no-console
console.warn('unable to connect to parent frame for connecting dev tools');
}</script></head><body><div id="root"></div><script src="runtime~main.729a62daeea60911f9f0.bundle.js"></script><script src="vendors~main.e889ef3aac259afce2ab.bundle.js"></script><script src="main.e30cc2d1af73e5d55c7f.bundle.js"></script></body></html>
2 changes: 2 additions & 0 deletions docs/main.04b16c49788466b13fd9.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/main.04b16c49788466b13fd9.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/main.e30cc2d1af73e5d55c7f.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/runtime~main.04b16c49788466b13fd9.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/runtime~main.04b16c49788466b13fd9.bundle.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/runtime~main.729a62daeea60911f9f0.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/sb_dll/storybook_ui-manifest.json

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions docs/sb_dll/storybook_ui_dll.LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**!
* @fileOverview Kickass library to create and place poppers near their reference elements.
* @version 1.14.7
* @license
* Copyright (c) 2016 Federico Zivolo and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

/*!
* https://github.com/es-shims/es5-shim
* @license es5-shim Copyright 2009-2015 by contributors, MIT License
* see https://github.com/es-shims/es5-shim/blob/master/LICENSE
*/

/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/

/*!
* https://github.com/paulmillr/es6-shim
* @license es6-shim Copyright 2013-2016 by Paul Miller (http://paulmillr.com)
* and contributors, MIT License
* es6-shim: v0.35.4
* see https://github.com/paulmillr/es6-shim/blob/0.35.3/LICENSE
* Details and documentation:
* https://github.com/paulmillr/es6-shim/
*/

/** @license React v16.8.1
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/** @license React v0.13.1
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/*
object-assign
(c) Sindre Sorhus
@license MIT
*/

/** @license React v16.8.1
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/*!
Copyright (c) 2016 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
2 changes: 2 additions & 0 deletions docs/sb_dll/storybook_ui_dll.js

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions docs/vendors~main.04b16c49788466b13fd9.bundle.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/vendors~main.04b16c49788466b13fd9.bundle.js.map

Large diffs are not rendered by default.

87 changes: 87 additions & 0 deletions docs/vendors~main.e889ef3aac259afce2ab.bundle.js

Large diffs are not rendered by default.

Loading

0 comments on commit d7083ec

Please sign in to comment.