-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add some help text into the react-native preview panel
- Loading branch information
1 parent
af985d1
commit 5ed72e8
Showing
2 changed files
with
72 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import PropTypes from 'prop-types'; | ||
import React, { Component } from 'react'; | ||
|
||
class PreviewHelp extends Component { | ||
render() { | ||
return ( | ||
<div style={styles.main}> | ||
<h1>Welcome to STORYBOOK</h1> | ||
<p> | ||
This is a UI component dev environment for your app. | ||
</p> | ||
<p> | ||
We've added some basic stories inside the | ||
{' '} | ||
<span style={styles.code}>storybook/stories</span> | ||
{' '} | ||
directory. | ||
{' '} | ||
A story is a single state of one or more UI components. You can have as many stories as you want. Basically a story is like a visual test case. | ||
</p> | ||
<p> | ||
To see your Storybook stories on the device, you should start your mobile app for the | ||
{' '} | ||
<span style={styles.code}><platform></span> | ||
{' '} | ||
of your choice (typically ios or android). | ||
</p> | ||
<p> | ||
For <span style={styles.code}>create-react-native-app</span> apps: | ||
</p> | ||
<div style={styles.codeBlock}> | ||
<pre style={styles.instructionsCode}>npm run <platform></pre> | ||
</div> | ||
<p> | ||
For <span style={styles.code}>react-native init</span> apps: | ||
</p> | ||
<div style={styles.codeBlock}> | ||
<pre style={styles.instructionsCode}>npm run <platform></pre> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
const styles = { | ||
main: { | ||
margin: 15, | ||
maxWidth: 600, | ||
lineHeight: 1.4, | ||
fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', | ||
}, | ||
|
||
code: { | ||
fontSize: 15, | ||
fontWeight: 600, | ||
padding: '2px 5px', | ||
border: '1px solid #eae9e9', | ||
borderRadius: 4, | ||
backgroundColor: '#f3f2f2', | ||
color: '#3a3a3a', | ||
}, | ||
|
||
codeBlock: { | ||
backgroundColor: '#f3f2f2', | ||
padding: '1px 10px', | ||
margin: '10px 0', | ||
}, | ||
}; | ||
|
||
export default PreviewHelp; |
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