Skip to content

Commit

Permalink
fix(scrollView): fix scrollbar overflow issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur Bien committed Dec 6, 2020
1 parent e017c1b commit fa8b762
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 23 deletions.
41 changes: 20 additions & 21 deletions example/src/examples/CutoutExample.tsx
Original file line number Diff line number Diff line change
@@ -1,33 +1,32 @@
import React from 'react';
import { View } from 'react-native';
import { Cutout, Text, Window } from 'react95-native';

import Container from '../util/Container';

const CutoutExample = () => {
return (
<Container>
<Container.Section title='Usage:'>
<Window style={{ padding: 12 }}>
<Cutout style={{ height: 120 }}>
<Text>
React95 React95 React95 React95 React95 React95 React95 React95
React95 React95
</Text>
<Text>
React95 React95 React95 React95 React95 React95 React95 React95
React95 React95
</Text>
<Text>
React95 React95 React95 React95 React95 React95 React95 React95
React95 React95
</Text>
<Text>
React95 React95 React95 React95 React95 React95 React95 React95
React95 React95
</Text>
</Cutout>
<View>
<Window title='Cutout example' style={{ width: '100%' }}>
<View style={{ height: 260, padding: 16 }}>
<Cutout>
<Text>
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.
</Text>
</Cutout>
</View>
</Window>
</Container.Section>
</View>
</Container>
);
};
Expand Down
3 changes: 1 addition & 2 deletions src/Cutout/Cutout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ const Cutout = ({ children, style = {} }: Props) => {

const styles = StyleSheet.create({
wrapper: {
width: '100%',
height: 100,
// to compensate for borders
position: 'relative',
padding: 4,
},
content: {
Expand Down
1 change: 1 addition & 0 deletions src/ScrollView/ScrollView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ const styles = StyleSheet.create({
},
content: {
flexGrow: 1,
flex: 1,
},
scrollbarTrack: {
height: '100%',
Expand Down

0 comments on commit fa8b762

Please sign in to comment.