@quintype/native-components 2.30.1--merged-branches → 2.30.2--alt-story-layout-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quintype/native-components",
3
- "version": "2.30.1--merged-branches",
3
+ "version": "2.30.2--alt-story-layout-beta",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -12,35 +12,12 @@ import { headerStyles } from "./styles";
12
12
 
13
13
  export const Header = (props) => {
14
14
  const { theme } = useContext(AppTheme);
15
- const { noBorder, centerAlignLogo } = props || {};
16
- const styles = headerStyles(theme, noBorder, centerAlignLogo);
15
+ const styles = headerStyles(theme, props.noBorder);
17
16
  const headerStyle = StyleSheet.flatten([styles.header, props.style]);
18
17
  const logoComponentStyle = StyleSheet.flatten([
19
18
  styles.logoComponentStyle,
20
19
  props.logoComponentStyle,
21
20
  ]);
22
- if (centerAlignLogo) {
23
- return (
24
- <View style={styles.header}>
25
- <View style={styles.leftContainer}>
26
- {props.leftComponent && props.leftComponent}
27
- </View>
28
- {props.logoComponent && (
29
- <TouchableOpacity
30
- style={logoComponentStyle}
31
- onPress={props.onPress}
32
- testID={COMP_GENERAL_CONSTANTS.headerLogoTouch}
33
- >
34
- {props.logoComponent}
35
- </TouchableOpacity>
36
- )}
37
- <View style={styles.rightContainer}>
38
- {props.rightComponent && props.rightComponent}
39
- </View>
40
- </View>
41
- )
42
- }
43
-
44
21
  return (
45
22
  <View style={headerStyle}>
46
23
  <View>
@@ -1,35 +1,19 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
 
3
- export const headerStyles = (appThemeContext, noBorder, centerAlignLogo) => {
3
+ export const headerStyles = (appThemeContext, noBorder) => {
4
4
  const { COLORS, DARK_MODE } = appThemeContext;
5
- const headerContainerStyles = {
5
+ return StyleSheet.create({
6
6
  header: {
7
7
  height: 48,
8
8
  backgroundColor: DARK_MODE ? COLORS.MONO6 : COLORS.BRAND_WHITE,
9
9
  flexDirection: 'row',
10
10
  alignItems: 'center',
11
- justifyContent: centerAlignLogo ? 'center' : 'space-between',
11
+ justifyContent: 'space-between',
12
12
  paddingHorizontal: 10,
13
13
  borderBottomColor: noBorder
14
14
  ? (DARK_MODE ? COLORS.BRAND_WHITE : COLORS.BRAND_BLACK)
15
15
  : (DARK_MODE ? COLORS.MONO6 : COLORS.BRAND5),
16
16
  borderBottomWidth: StyleSheet.hairlineWidth,
17
- }
18
- }
19
-
20
- if (centerAlignLogo) {
21
- return StyleSheet.create({
22
- ...headerContainerStyles,
23
- leftContainer: {
24
- flex: 1, // Takes up all left space
25
- alignItems: 'flex-start', // Aligns leftView to the left
26
- },
27
- rightContainer: {
28
- flex: 1, // Takes up all right space
29
- alignItems: 'flex-end', // Aligns rightView to the right
30
- }
31
- });
32
- }
33
-
34
- return StyleSheet.create(headerContainerStyles);
17
+ },
18
+ });
35
19
  };