-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(scrollview): add support for horizontal scrollview
- Loading branch information
Artur Bien
committed
Dec 31, 2020
1 parent
f14d164
commit aa9eabd
Showing
3 changed files
with
96 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React from 'react'; | ||
import { StyleSheet, View } from 'react-native'; | ||
import { Text, Panel, Cutout, ScrollView } from 'react95-native'; | ||
|
||
const lorem = `Lorem Ipsum is simply dummy text of the printing and typesetting | ||
industry. Lorem Ipsum has been the industry standard dummy text | ||
ever since the 1500s, when an unknown printer took a galley of | ||
type and scrambled it to make a type specimen book. It has | ||
survived not only five centuries, but also the leap into | ||
electronic typesetting, remaining essentially unchanged. It was | ||
popularised in the 1960s with the release of Letraset sheets | ||
containing Lorem Ipsum passages, and more recently with desktop | ||
publishing software like Aldus PageMaker including versions of | ||
Lorem Ipsum.`; | ||
|
||
const NumberInputExample = () => { | ||
return ( | ||
<Panel style={styles.container}> | ||
<Cutout style={{ height: 200 }}> | ||
<ScrollView alwaysShowScrollbars> | ||
<Text>{lorem}</Text> | ||
</ScrollView> | ||
</Cutout> | ||
<Cutout style={{ marginTop: 20 }}> | ||
<ScrollView alwaysShowScrollbars horizontal> | ||
<View style={{ width: 1000 }}> | ||
<Text>{lorem}</Text> | ||
</View> | ||
</ScrollView> | ||
</Cutout> | ||
</Panel> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
padding: 16, | ||
}, | ||
fieldset: { | ||
padding: 20, | ||
}, | ||
}); | ||
|
||
export default NumberInputExample; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters