mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-23 20:10:41 +08:00
Better layout for Text examples
This commit is contained in:
@@ -9,6 +9,10 @@ const styles = StyleSheet.create({
|
||||
}
|
||||
});
|
||||
|
||||
export default function (storyFn) {
|
||||
return <View style={[ StyleSheet.absoluteFill, styles.root ]}>{storyFn()}</View>;
|
||||
export default function (renderStory) {
|
||||
return (
|
||||
<View style={[ StyleSheet.absoluteFill, styles.root ]}>
|
||||
{renderStory()}
|
||||
</View>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -271,7 +271,7 @@ const examples = [
|
||||
<Text>
|
||||
auto (default) - english LTR
|
||||
</Text>
|
||||
<Text>
|
||||
<Text style={{ writingDirection: 'rtl' }}>
|
||||
أحب اللغة العربية auto (default) - arabic RTL
|
||||
</Text>
|
||||
<Text style={{textAlign: 'left'}}>
|
||||
@@ -467,5 +467,6 @@ var styles = StyleSheet.create({
|
||||
|
||||
examples.forEach((example) => {
|
||||
storiesOf('<Text>', module)
|
||||
.addDecorator((renderStory) => <View style={{ width: 320 }}>{renderStory()}</View>)
|
||||
.add(example.title, () => example.render())
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user