@momo-kits/badge 0.92.34 → 0.102.1-beta.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/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,17 +1,17 @@
1
1
  {
2
- "name": "@momo-kits/badge",
3
- "version": "0.92.34",
4
- "private": false,
5
- "main": "index.tsx",
6
- "peerDependencies": {
7
- "@momo-kits/foundation": "latest",
8
- "react": "16.9.0",
9
- "react-native": ">=0.55",
10
- "prop-types": "^15.7.2"
11
- },
12
- "devDependencies": {
13
- "@momo-platform/versions": "4.1.11"
14
- },
15
- "license": "MoMo",
16
- "dependencies": {}
2
+ "name": "@momo-kits/badge",
3
+ "version": "0.102.1-beta.1",
4
+ "private": false,
5
+ "main": "index.tsx",
6
+ "peerDependencies": {
7
+ "@momo-kits/foundation": "latest",
8
+ "react": "16.9.0",
9
+ "react-native": ">=0.55",
10
+ "prop-types": "^15.7.2"
11
+ },
12
+ "devDependencies": {
13
+ "@momo-platform/versions": "4.1.11"
14
+ },
15
+ "license": "MoMo",
16
+ "dependencies": {}
17
17
  }
package/publish.sh CHANGED
@@ -11,7 +11,7 @@ if [ "$1" == "stable" ]; then
11
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
17
  npm version $(npm view @momo-kits/badge@beta version)
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
  /**