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.
feat(generators): Finish simplifying component definitions; component…
… & screen generator tweaks (#363) [skip-ci] * fix(test): update test for screen generator * fix(screen): sync screen generator with template * fix(warn): Fix a new-to-storybook-5.3.0 warning * feat(types): Remove remaining components' & screens' FunctionComponent typing * feat(generators): Update the component generator to generate observer-wrapped and plain components Also, simplified the generated component content to require less initial work on new components, and moved the style definitions into the component file (since our predefined components all have integrated styles) * feat(cli): Allow CamelCase or kebab-case when generating screens or components; tolerate either suffix Consistenly use kebab-case for filenames * fix(lint): `yarn format` fixes Co-authored-by: Lasha Kava <lasha@Lashas-iMac.local> Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
- Loading branch information
1 parent
4b1d8b5
commit 86b3223
Showing
21 changed files
with
114 additions
and
184 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
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
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
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,16 +1,15 @@ | ||
import * as React from "react" | ||
import { storiesOf } from "@storybook/react-native" | ||
import { StoryScreen, Story, UseCase } from "../../../storybook/views" | ||
import { <%= props.pascalName %> } from "./<%= props.name %>" | ||
|
||
declare var module | ||
import { color } from "../../theme" | ||
import { <%= props.pascalName %> } from "./<%= props.kebabCaseName %>" | ||
|
||
storiesOf("<%= props.pascalName %>", module) | ||
.addDecorator(fn => <StoryScreen>{fn()}</StoryScreen>) | ||
.add("Style Presets", () => ( | ||
<Story> | ||
<UseCase text="Primary" usage="The primary."> | ||
<<%= props.pascalName %> text="<%= props.pascalName %>" /> | ||
<<%= props.pascalName %> style={{ backgroundColor: color.error }} /> | ||
</UseCase> | ||
</Story> | ||
)) |
Oops, something went wrong.