-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add Token component to Storybook and one more state of this component
- Loading branch information
1 parent
3a13f8c
commit b2cef87
Showing
4 changed files
with
89 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
/flow-coverage | ||
/build | ||
.idea/ | ||
**/.DS_Store |
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,22 @@ | ||
import * as React from "react"; | ||
import { storiesOf } from "@storybook/react"; | ||
import { action } from "@storybook/addon-actions"; | ||
import Token from "../Components/Token/Token"; | ||
|
||
storiesOf("Token", module) | ||
.addDecorator((story) => <div style={{ margin: 20 }}>{story()}</div>) | ||
.add("removable", () => ( | ||
<Token type="removable" onRemove={action("onRemove")}> | ||
dev | ||
</Token> | ||
)) | ||
.add("selectable", () => ( | ||
<Token type="selectable" onClick={action("handleClick")}> | ||
dev | ||
</Token> | ||
)) | ||
.add("question", () => ( | ||
<Token type="question" onClick={action("handleClick")}> | ||
dev | ||
</Token> | ||
)); |