Skip to content

Commit

Permalink
Updating storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
timludikar committed Jun 22, 2018
1 parent 510564d commit 80fc563
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 220 deletions.
1 change: 0 additions & 1 deletion mibank-components/.storybook/addons.js
@@ -1,2 +1 @@
import "@storybook/addon-knobs/register";
import "@storybook/addon-actions/register";
2 changes: 1 addition & 1 deletion mibank-components/package.json
Expand Up @@ -28,7 +28,7 @@
"@stencil/utils": "latest",
"@storybook/addon-actions": "^4.0.0-alpha.9",
"@storybook/addon-knobs": "^4.0.0-alpha.9",
"@storybook/html": "^4.0.0-alpha.4",
"@storybook/html": "^4.0.0-alpha.9",
"@types/chart.js": "^2.7.22",
"@types/jest": "^21.1.1",
"awesome-typescript-loader": "^5.0.0",
Expand Down
9 changes: 5 additions & 4 deletions mibank-components/src/components/mi-table/mi-table.stories.ts
@@ -1,14 +1,15 @@
import { storiesOf } from "@storybook/html";
import { withKnobs, array } from "@storybook/addon-knobs";
import { HTMLTableElement } from "./mi-table";

const stories = storiesOf("Table", module);
const stories = storiesOf("Table", module).addDecorator(withKnobs);
stories.add("default", () => {
const headings = ["Account Name", "Amount"];
const data = [
const headings = array("Heading", ["Account Name", "Amount"]);
const data = array("Data", [
["Account 1", "$1000"],
["Account 2", "$2000"],
["Account 3", "$3000"]
];
]);

const table: HTMLTableElement = <HTMLTableElement>(
document.createElement("mi-table")
Expand Down
12 changes: 0 additions & 12 deletions mibank-components/www/index.html
Expand Up @@ -61,18 +61,6 @@
<mi-section></mi-section>
<mi-table></mi-table>

<script>
if ('serviceWorker' in navigator && location.protocol !== 'file:') {
// auto-unregister service worker during dev mode
navigator.serviceWorker.getRegistration().then(function(registration) {
if (registration) {
registration.unregister().then(function() { location.reload(true) });
}
});
}
</script>



<script>
window.onload = function () {
Expand Down

0 comments on commit 80fc563

Please sign in to comment.