@momo-kits/title 0.92.8 → 0.92.14-rc.1

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/index.tsx CHANGED
@@ -1,13 +1,13 @@
1
1
  import React, {FC, useContext, useState} from 'react';
2
2
  import {Text as RNText, TouchableOpacity, View, ViewStyle} from 'react-native';
3
3
  import {
4
- Typography,
4
+ ApplicationContext,
5
+ Badge,
5
6
  Colors,
6
7
  Icon,
7
- Badge,
8
- ApplicationContext,
9
8
  scaleSize,
10
9
  Text,
10
+ Typography,
11
11
  } from '@momo-kits/foundation';
12
12
  import styles from './styles';
13
13
  import {TitleProps} from './types';
@@ -102,7 +102,7 @@ const Title: FC<TitleProps> = ({
102
102
  )}
103
103
  {renderActionLeft()}
104
104
  </View>
105
- {description && (
105
+ {!!description && (
106
106
  <Text
107
107
  style={styles.description}
108
108
  color={theme.colors.text.secondary}
@@ -143,8 +143,14 @@ const Title: FC<TitleProps> = ({
143
143
  const renderActionRight = () => {
144
144
  if (!showRightAction || showTrailingAction) return false;
145
145
 
146
+ const lineHeight = styleSheet[typography].lineHeight;
147
+
146
148
  return (
147
- <View>
149
+ <View
150
+ style={{
151
+ height: lineHeight,
152
+ justifyContent: 'center',
153
+ }}>
148
154
  {!buttonTitle ? (
149
155
  <TouchableOpacity
150
156
  onPress={onPressRightAction}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/title",
3
- "version": "0.92.8",
3
+ "version": "0.92.14-rc.1",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "dependencies": {},
package/publish.sh CHANGED
@@ -1,29 +1,29 @@
1
1
  #!/bin/bash
2
+
3
+ # Prepare dist files
2
4
  rm -rf dist
3
5
  mkdir dist
4
-
5
- cp . ./dist
6
-
7
- # GET VERSION from mck_package.json
8
- VERSIONSTRING=( v$(jq .version package.json) )
9
- VERSION=(${VERSIONSTRING//[\"]/})
10
- echo VERSION: $VERSION
11
-
12
- rsync -r --verbose --exclude '*.mdx' --exclude '*Demo.js' --exclude 'props-type.js' --exclude 'prop-types.js' ./* dist
13
-
14
- # #babel component to dist
15
- #babel ./dist -d dist --copy-files
16
-
17
- #copy option
18
- #cp -r ./src/ dist
6
+ rsync -r --exclude=/dist ./* dist
7
+ cd dist
19
8
 
20
9
 
21
- #npm login
22
- #publish dist to npm
23
- cd dist
24
- npm publish --tag beta --access=public
10
+ if [ "$1" == "stable" ]; then
11
+ #npm version $(npm view @momo-kits/title@stable version)
12
+ npm version patch
13
+ npm publish --tag stable --access=public
14
+ elif [ "$1" == "latest" ]; then
15
+ #npm version $(npm view @momo-kits/title@latest version)
16
+ #npm version prerelease --preid=rc
17
+ npm publish --tag latest --access=public
18
+ else
19
+ #npm version $(npm view @momo-kits/title@beta version)
20
+ #npm version prerelease --preid=beta
21
+ npm publish --tag beta --access=public
22
+ fi
23
+
24
+ PACKAGE_NAME=$(npm pkg get name)
25
+ NEW_PACKAGE_VERSION=$(npm pkg get version)
26
+
27
+ # Clean up
25
28
  cd ..
26
29
  rm -rf dist
27
-
28
-
29
- ##curl -X POST -H 'Content-Type: application/json' 'https://chat.googleapis.com/v1/spaces/AAAAbP8987c/messages?key=AIzaSyDdI0hCZtE6vySjMm-WEfRq3CPzqKqqsHI&token=UGSFRvk_oYb9uGsAgs31bVvMm6jDkmD8zihGm3eyaQA%3D&threadKey=JoaXTEYaNNkl' -d '{"text": "@momo-kits/stepper new version release: '*"$VERSION"*' https://www.npmjs.com/package/@momo-kits/stepper"}'
package/styles.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import {StyleSheet} from 'react-native';
2
- import {scaleSize, Radius, Spacing, Colors} from '@momo-kits/foundation';
2
+ import {Colors, Radius, scaleSize, Spacing} from '@momo-kits/foundation';
3
3
 
4
4
  export default StyleSheet.create({
5
5
  card_small: {