Skip to content

Commit

Permalink
Fix bug with accessibility, add console logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Spurrier committed Jun 12, 2020
1 parent a79f96c commit c716069
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/app/ui/.storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '@storybook/addon-console';
9 changes: 9 additions & 0 deletions src/app/ui/package-lock.json

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

1 change: 1 addition & 0 deletions src/app/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@fortawesome/fontawesome-free": "^5.13.0",
"@storybook/addon-a11y": "^5.3.19",
"@storybook/addon-actions": "^5.3.19",
"@storybook/addon-console": "^1.2.1",
"@storybook/addon-knobs": "^5.3.19",
"@storybook/addon-storysource": "^5.3.19",
"@storybook/mithril": "^5.3.19",
Expand Down
8 changes: 6 additions & 2 deletions src/app/ui/src/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,23 @@
import m from "mithril";
import { action } from "@storybook/addon-actions";
import { withKnobs, text, boolean, number } from "@storybook/addon-knobs";
import { withA11y } from "@storybook/addon-a11y";
import Block from "./module/block";

export default {
title: "Structure/Block",
component: Block,
decorators: [withKnobs],
decorators: [withKnobs, withA11y],
};

export const button = () => ({
view: () => (
<button
disabled={boolean("Disabled", false)}
onclick={action("button-click")}
onclick={() => {
action("button-click");
console.log("Clicked!");
}}
>
{text("Label", "Hello Storybook")}
</button>
Expand Down

0 comments on commit c716069

Please sign in to comment.