@quintype/native-components 2.30.2-center-align-title-beta → 2.30.2-center-align-title-beta-2

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.2-center-align-title-beta",
3
+ "version": "2.30.2-center-align-title-beta-2",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -12,8 +12,8 @@ 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 { noBorder, centerAlignLogo, customHeight } = props || {};
16
+ const styles = headerStyles(theme, noBorder, centerAlignLogo, customHeight);
17
17
  const headerStyle = StyleSheet.flatten([styles.header, props.style]);
18
18
  const logoComponentStyle = StyleSheet.flatten([
19
19
  styles.logoComponentStyle,
@@ -71,4 +71,5 @@ Header.propTypes = {
71
71
  logoComponentStyle: PropTypes.object,
72
72
  onPress: PropTypes.func,
73
73
  noBorder: PropTypes.bool,
74
+ customHeight: PropTypes.number,
74
75
  };
@@ -1,10 +1,10 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
 
3
- export const headerStyles = (appThemeContext, noBorder, centerAlignLogo) => {
3
+ export const headerStyles = (appThemeContext, noBorder, centerAlignLogo, customHeight) => {
4
4
  const { COLORS, DARK_MODE } = appThemeContext;
5
5
  const headerContainerStyles = {
6
6
  header: {
7
- height: 48,
7
+ height: customHeight ?? 48,
8
8
  backgroundColor: DARK_MODE ? COLORS.MONO6 : COLORS.BRAND_WHITE,
9
9
  flexDirection: 'row',
10
10
  alignItems: 'center',
@@ -105,10 +105,11 @@ export const StoryHeader = (props) => {
105
105
  };
106
106
 
107
107
  const getSectionName = (storyLayout = 'default') => {
108
- const style = isHeadLinePriorityLayout ? styles.headlinePriority.sectionText : styles.sectionText
108
+ const style = isHeadLinePriorityLayout ? styles.headlinePriority.sectionText : styles.sectionText;
109
+ const centerAlignStyle = centerAlignStoryTitle? styles?.centerAlign: ''
109
110
  return <TouchableOpacity onPress={navigateToSection}>
110
111
  <Text
111
- style={style}
112
+ style={[style, centerAlignStyle]}
112
113
  testID={COMP_CONTENT_CONSTANTS.sectionName}
113
114
  >
114
115
  {sectionData['display-name'] || ''}
@@ -60,5 +60,8 @@ export const storyHeaderStyles = (COLORS, FONT_FAMILY) => StyleSheet.create({
60
60
  fontFamily: FONT_FAMILY.secondary,
61
61
  fontWeight: "bold",
62
62
  },
63
+ },
64
+ centerAlign: {
65
+ textAlign: 'center'
63
66
  }
64
67
  });