mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-03-26 09:14:15 +08:00
Add a development sandbox to storybook
This commit is contained in:
12
website/storybook/3-demos/Sandbox/Sandbox.js
Normal file
12
website/storybook/3-demos/Sandbox/Sandbox.js
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from 'react';
|
||||
import { View, StyleSheet } from 'react-native';
|
||||
|
||||
export default class Sandbox extends React.PureComponent {
|
||||
render() {
|
||||
return <View styles={styles.root} />;
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {}
|
||||
});
|
||||
9
website/storybook/3-demos/Sandbox/SandboxScreen.js
Normal file
9
website/storybook/3-demos/Sandbox/SandboxScreen.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import React from 'react';
|
||||
import { storiesOf } from '../../ui-explorer';
|
||||
import Sandbox from './Sandbox';
|
||||
|
||||
const SandboxScreen = () => <Sandbox />;
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
storiesOf('Example apps', module).add('Sandbox', SandboxScreen);
|
||||
}
|
||||
Reference in New Issue
Block a user