This repository has been archived by the owner on Jan 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from infinitered/add-reactotron-to-storybook
Add reactotron to storybook
- Loading branch information
Showing
10 changed files
with
503 additions
and
329 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
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 |
---|---|---|
@@ -1,30 +1,43 @@ | ||
import * as React from "react" | ||
import { View } from "react-native" | ||
import { storiesOf } from "@storybook/react-native" | ||
import { StoryScreen, Story, UseCase } from "../../../../storybook/views" | ||
import { Header } from "./header" | ||
import { color } from "../../../theme/color" | ||
|
||
const VIEWSTYLE = { | ||
flex: 1, | ||
backgroundColor: color.storybookDarkBg, | ||
} | ||
|
||
storiesOf("Header", module) | ||
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>) | ||
.add("Behavior", () => ( | ||
<Story> | ||
<UseCase noPad text="default" usage="The default usage"> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
/> | ||
<View style={VIEWSTYLE}> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
/> | ||
</View> | ||
</UseCase> | ||
<UseCase noPad text="leftIcon" usage="A left nav icon"> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
leftIcon="back" | ||
onLeftPress={() => window.alert("left nav")} | ||
/> | ||
<View style={VIEWSTYLE}> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
leftIcon="back" | ||
onLeftPress={() => window.alert("left nav")} | ||
/> | ||
</View> | ||
</UseCase> | ||
<UseCase noPad text="rightIcon" usage="A right nav icon"> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
rightIcon="bullet" | ||
onRightPress={() => window.alert("right nav")} | ||
/> | ||
<View style={VIEWSTYLE}> | ||
<Header | ||
headerTx="secondExampleScreen.howTo" | ||
rightIcon="bullet" | ||
onRightPress={() => window.alert("right nav")} | ||
/> | ||
</View> | ||
</UseCase> | ||
</Story> | ||
)) |
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.