mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Reorganize examples
This commit is contained in:
@@ -113,5 +113,5 @@ var styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
|
||||
storiesOf('PanResponder', module)
|
||||
storiesOf('api: PanResponder', module)
|
||||
.add('example', () => <PanResponderExample />)
|
||||
@@ -170,6 +170,6 @@ const styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<ActivityIndicator>', module)
|
||||
storiesOf('component: ActivityIndicator', module)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -651,7 +651,7 @@ var styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<Image>', module)
|
||||
storiesOf('component: Image', module)
|
||||
.addDecorator((renderStory) => <View>{renderStory()}</View>)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 850 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
import { ScrollView, StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
storiesOf('<ScrollView>', module)
|
||||
storiesOf('component: ScrollView', module)
|
||||
.add('vertical', () => (
|
||||
<View style={styles.scrollViewContainer}>
|
||||
<ScrollView
|
||||
@@ -185,6 +185,6 @@ var examples = [
|
||||
];
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<Switch>', module)
|
||||
storiesOf('component: Switch', module)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -466,7 +466,7 @@ var styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<Text>', module)
|
||||
storiesOf('component: Text', module)
|
||||
.addDecorator((renderStory) => <View style={{ width: 320 }}>{renderStory()}</View>)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
import { StyleSheet, TextInput, View } from 'react-native'
|
||||
|
||||
storiesOf('<TextInput>', module)
|
||||
storiesOf('component: TextInput', module)
|
||||
.add('tbd', () => (
|
||||
<View>
|
||||
<TextInput
|
||||
@@ -445,6 +445,6 @@ var styles = StyleSheet.create({
|
||||
});
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<Touchable*>', module)
|
||||
storiesOf('component: Touchable*', module)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -245,6 +245,6 @@ const examples = [
|
||||
];
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<View>', module)
|
||||
storiesOf('component: View', module)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -281,6 +281,6 @@ const examples = [
|
||||
];
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<View> transforms', module)
|
||||
storiesOf('component: View (transforms)', module)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
import Game2048 from './Game2048'
|
||||
|
||||
storiesOf('Game2048', module)
|
||||
storiesOf('demo: Game2048', module)
|
||||
.add('the game', () => (
|
||||
<Game2048 />
|
||||
))
|
||||
@@ -2,7 +2,7 @@ import React from 'react';
|
||||
import { storiesOf, action } from '@kadira/storybook';
|
||||
import TicTacToe from './TicTacToe'
|
||||
|
||||
storiesOf('TicTacToe', module)
|
||||
storiesOf('demo: TicTacToe', module)
|
||||
.add('the game', () => (
|
||||
<TicTacToe />
|
||||
))
|
||||
Reference in New Issue
Block a user