-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change all functions to arrow functions
- Loading branch information
1 parent
4f39386
commit be5dd8c
Showing
16 changed files
with
91 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import m from "mithril"; // eslint-disable-line no-unused-vars | ||
import { withKnobs, text, select } from "@storybook/addon-knobs"; | ||
import { withA11y } from "@storybook/addon-a11y"; | ||
import Input from "./input"; | ||
import "~/style/main.scss"; | ||
|
||
export default { | ||
title: "Component/Input", | ||
component: Input, | ||
decorators: [withKnobs, withA11y], | ||
}; | ||
|
||
export const input = () => ({ | ||
oninit: (vnode) => { | ||
vnode.state.type = select( | ||
"Type", | ||
{ | ||
text: "text", | ||
color: "color", | ||
date: "date", | ||
"datetime-local": "datetime-local", | ||
email: "email", | ||
hidden: "hidden", | ||
month: "month", | ||
number: "number", | ||
password: "password", | ||
range: "range", | ||
search: "search", | ||
time: "time", | ||
week: "week", | ||
}, | ||
"text" | ||
); | ||
}, | ||
view: (vnode) => ( | ||
<Input | ||
label="First Name" | ||
value={text("Value", "John")} | ||
type={vnode.state.type} | ||
/> | ||
), | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,3 @@ export default { | |
export const menu = () => ({ | ||
view: () => <Menu />, | ||
}); | ||
menu.story = { | ||
name: "Menu", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.