Refactor styles

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2023-07-26 10:14:01 +03:00
parent caa98736e9
commit abe1c0847d
22 changed files with 261 additions and 328 deletions

View File

@@ -2,7 +2,6 @@ import React, { useEffect, useRef } from 'react';
import { Animated, StyleSheet } from 'react-native';
import { useTheme } from 'react-native-paper';
import { useDeviceOrientation } from '@react-native-community/hooks';
import styles from '../styles';
const hideableHeaderStyles = StyleSheet.create({
headerView: {
@@ -11,6 +10,13 @@ const hideableHeaderStyles = StyleSheet.create({
left: 0,
right: 0,
zIndex: 1,
paddingHorizontal: '4%',
},
headerViewPortrait: {
paddingTop: '4%',
},
headerViewLandscape: {
paddingTop: '2%',
},
});
@@ -38,8 +44,9 @@ const HideableHeader = ({
<Animated.View
style={[
hideableHeaderStyles.headerView,
orientation === 'portrait' ? styles.paddingTop : styles.smallPaddingTop,
styles.paddingHorizontal,
orientation === 'portrait'
? hideableHeaderStyles.headerViewPortrait
: hideableHeaderStyles.headerViewLandscape,
{
transform: [
{