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