Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
FormRow style array story
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Laco committed Sep 26, 2018
1 parent 6ecb0c5 commit fda27fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions boilerplate/src/views/shared/form-row/form-row.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ import { StoryScreen, Story, UseCase } from "../../../../storybook/views"
import { FormRow } from "./form-row"
import { Text } from "../text"
import { color } from "../../../theme/color"
import { ViewStyle } from "react-native"

const TEXT_STYLE_OVERRIDE = {
color: color.storybookTextColor,
}
const arrayStyle: ViewStyle[] = [
{borderWidth: 5},
{borderColor: "#32cd32"},
]

storiesOf("FormRow", module)
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>)
Expand Down Expand Up @@ -86,3 +91,12 @@ storiesOf("FormRow", module)
</UseCase>
</Story>
))
.add("Style", () => (
<Story>
<UseCase text="Style array" usage="Form row with an array of styles">
<FormRow preset="soloStraight" style={arrayStyle}>
<Text style={TEXT_STYLE_OVERRIDE}>Array style.</Text>
</FormRow>
</UseCase>
</Story>
))

0 comments on commit fda27fb

Please sign in to comment.