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