Fix margins with the desktop scaffold

This commit is contained in:
2024-01-06 16:11:26 +01:00
committed by Clément Le Bihan
parent 359b20fc6d
commit cfc72b8bc1
3 changed files with 16 additions and 21 deletions

View File

@@ -4,4 +4,4 @@ WORKDIR /app
RUN yarn global add npx expo-cli RUN yarn global add npx expo-cli
ENV DEVAPIURL http://back:3000 ENV DEVAPIURL http://back:3000
CMD npx expo start CMD npx expo start --web

View File

@@ -187,10 +187,7 @@ const RouteToScreen = <T extends {}>(Component: Route<T>['component']) =>
<LinearGradient <LinearGradient
colors={colorScheme === 'dark' ? ['#101014', '#6075F9'] : ['#cdd4fd', '#cdd4fd']} colors={colorScheme === 'dark' ? ['#101014', '#6075F9'] : ['#cdd4fd', '#cdd4fd']}
style={{ style={{
width: '100%', flex: 1,
height: '100%',
position: 'absolute',
zIndex: -2,
}} }}
> >
<Component {...(props.route.params as T)} route={props.route} /> <Component {...(props.route.params as T)} route={props.route} />

View File

@@ -231,22 +231,20 @@ const ScaffoldDesktopCC = ({
/> />
</View> </View>
</View> </View>
<ScrollView style={{ flex: 1, maxHeight: '100%' }} contentContainerStyle={{ flex: 1 }}> <ScrollView
<View style={{ flex: 1, maxHeight: '100%' }}
style={{ contentContainerStyle={{
backgroundColor: colors.coolGray[500], flex: 1,
flex: 1, backgroundColor: colors.coolGray[500],
margin: 8, margin: 8,
marginBottom: 0, padding: 20,
marginLeft: 0, borderRadius: 12,
padding: 20, // Become the same height as the child so if the child has overflow: auto, the child's scrollbar
borderRadius: 12, // is hidden and we use this component's scrollbar.
minHeight: 'auto', minHeight: "auto"
}} }}
> >
{children} {children}
</View>
<Spacer height="xs" />
</ScrollView> </ScrollView>
</View> </View>
); );