@momo-kits/badge 0.92.34 → 0.102.1-beta.0

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/Badge.tsx CHANGED
@@ -5,7 +5,12 @@ import {BadgeProps} from './types';
5
5
  import styles from './styles';
6
6
  import {ApplicationContext, Colors, Text} from '@momo-kits/foundation';
7
7
 
8
- const Badge: FC<BadgeProps> = ({label = 'Label', style, backgroundColor}) => {
8
+ const Badge: FC<BadgeProps> = ({
9
+ label = 'Label',
10
+ style,
11
+ backgroundColor,
12
+ accessibilityLabel,
13
+ }) => {
9
14
  const {theme} = useContext(ApplicationContext);
10
15
 
11
16
  const isValidatedColor = () => {
@@ -43,7 +48,9 @@ const Badge: FC<BadgeProps> = ({label = 'Label', style, backgroundColor}) => {
43
48
  }
44
49
 
45
50
  return (
46
- <View style={[style, styles.badge, {backgroundColor: badgeColor}]}>
51
+ <View
52
+ style={[style, styles.badge, {backgroundColor: badgeColor}]}
53
+ accessibilityLabel={accessibilityLabel}>
47
54
  <Text color={Colors.black_01} typography={'action_xxs_bold'}>
48
55
  {formatTitle()}
49
56
  </Text>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/badge",
3
- "version": "0.92.34",
3
+ "version": "0.102.1-beta.0",
4
4
  "private": false,
5
5
  "main": "index.tsx",
6
6
  "peerDependencies": {
@@ -14,4 +14,4 @@
14
14
  },
15
15
  "license": "MoMo",
16
16
  "dependencies": {}
17
- }
17
+ }
package/publish.sh CHANGED
@@ -7,15 +7,15 @@ rsync -r --exclude=/dist ./* dist
7
7
  cd dist
8
8
 
9
9
  if [ "$1" == "stable" ]; then
10
- npm version $(npm view @momo-kits/badge@stable version)
11
- npm version patch
10
+ #npm version $(npm view @momo-kits/badge@stable version)
11
+ #npm version patch
12
12
  npm publish --tag stable --access=public
13
13
  elif [ "$1" == "latest" ]; then
14
- npm version $(npm view @momo-kits/foundation@stable version)
14
+ #npm version $(npm view @momo-kits/foundation@latest version)
15
15
  npm publish --tag latest --access=public
16
16
  else
17
- npm version $(npm view @momo-kits/badge@beta version)
18
- npm version prerelease --preid=beta
17
+ #npm version $(npm view @momo-kits/badge@beta version)
18
+ #npm version prerelease --preid=beta
19
19
  npm publish --tag beta --access=public
20
20
  fi
21
21
 
package/types.ts CHANGED
@@ -18,6 +18,8 @@ export type BadgeProps = {
18
18
  * Optional. Custom background badge.
19
19
  */
20
20
  backgroundColor?: string;
21
+
22
+ accessibilityLabel?: string;
21
23
  };
22
24
 
23
25
  /**