@quintype/native-components 2.20.30 → 2.20.32-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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [2.20.32](https://github.com/quintype/native-components/compare/v2.20.31...v2.20.32) (2024-06-05)
|
|
6
|
+
|
|
7
|
+
### [2.20.31](https://github.com/quintype/native-components/compare/v2.20.30...v2.20.31) (2024-06-04)
|
|
8
|
+
|
|
5
9
|
### [2.20.30](https://github.com/quintype/native-components/compare/v2.20.29...v2.20.30) (2024-06-04)
|
|
6
10
|
|
|
7
11
|
### [2.20.29](https://github.com/quintype/native-components/compare/v2.20.28...v2.20.29) (2024-06-04)
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
#!/bin/bash -e
|
|
1
|
+
# #!/bin/bash -e
|
|
2
2
|
|
|
3
|
-
npm install
|
|
4
|
-
git diff --quiet
|
|
3
|
+
# npm install
|
|
4
|
+
# git diff --quiet
|
|
5
5
|
|
|
6
|
-
BRANCH=$(git symbolic-ref --short HEAD)
|
|
6
|
+
# BRANCH=$(git symbolic-ref --short HEAD)
|
|
7
7
|
|
|
8
|
-
if [ "$BRANCH" == 'master' ]
|
|
9
|
-
then
|
|
10
|
-
|
|
11
|
-
else
|
|
12
|
-
|
|
13
|
-
fi
|
|
8
|
+
# if [ "$BRANCH" == 'master' ]
|
|
9
|
+
# then
|
|
10
|
+
# npx standard-version
|
|
11
|
+
# else
|
|
12
|
+
# npx standard-version --prerelease "$(git symbolic-ref --short HEAD | sed s:/:-:g )" --skip.changelog=true
|
|
13
|
+
# fi
|
|
14
14
|
|
|
15
|
-
git push --follow-tags origin "$BRANCH"
|
|
15
|
+
# git push --follow-tags origin "$BRANCH"
|
package/package.json
CHANGED
|
@@ -1,45 +1,50 @@
|
|
|
1
|
-
import PropTypes from
|
|
2
|
-
import React, { useContext } from
|
|
3
|
-
import { View } from
|
|
4
|
-
import { Text } from "../Text";
|
|
5
|
-
import {ratingStyles} from './styles'
|
|
6
|
-
import { AppTheme } from "../../utils";
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import React, { useContext } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
7
4
|
import { StarRatingDisplay } from 'react-native-star-rating-widget';
|
|
5
|
+
import { Text } from '../Text';
|
|
6
|
+
import { ratingStyles } from './styles';
|
|
7
|
+
import { AppTheme } from '../../utils';
|
|
8
8
|
|
|
9
|
-
export const RatingLayout = ({ reviewTitle, ratingValue, ratingLabel }) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
export const RatingLayout = ({ reviewTitle, ratingValue, ratingLabel }) => {
|
|
10
|
+
const { theme } = useContext(AppTheme);
|
|
11
|
+
const {
|
|
12
|
+
COLORS, FONT_FAMILY, FONT_SIZE,
|
|
13
|
+
} = theme;
|
|
14
|
+
const styles = ratingStyles(COLORS, FONT_SIZE, FONT_FAMILY);
|
|
15
|
+
|
|
16
|
+
return (
|
|
17
|
+
<View style={styles.container}>
|
|
18
|
+
{reviewTitle && (
|
|
19
|
+
<Text
|
|
20
|
+
style={styles.reviewTitle}
|
|
21
|
+
primary
|
|
22
|
+
>
|
|
23
|
+
{reviewTitle}
|
|
24
|
+
</Text>
|
|
25
|
+
)}
|
|
26
|
+
{ratingValue && (
|
|
27
|
+
<View style={styles.child}>
|
|
28
|
+
<Text
|
|
29
|
+
style={styles.ratingLabel}
|
|
30
|
+
>
|
|
31
|
+
{`${ratingLabel}/5`}
|
|
32
|
+
</Text>
|
|
33
|
+
<StarRatingDisplay
|
|
34
|
+
rating={ratingValue}
|
|
35
|
+
starSize={FONT_SIZE.title}
|
|
36
|
+
color={COLORS.REVIEW_STAR_COLOR ?? '#F5A623'}
|
|
37
|
+
style={styles.starContiner}
|
|
38
|
+
starStyle={styles.starStyle}
|
|
39
|
+
/>
|
|
40
|
+
</View>
|
|
41
|
+
)}
|
|
42
|
+
</View>
|
|
43
|
+
);
|
|
39
44
|
};
|
|
40
45
|
|
|
41
46
|
RatingLayout.propTypes = {
|
|
42
47
|
reviewTitle: PropTypes.string.isRequired,
|
|
43
48
|
ratingValue: PropTypes.number.isRequired,
|
|
44
|
-
ratingLabel: PropTypes.string.isRequired
|
|
49
|
+
ratingLabel: PropTypes.string.isRequired,
|
|
45
50
|
};
|
|
@@ -4,20 +4,18 @@ export const ratingStyles = (COLORS, FONT_SIZE, FONT_FAMILY) => StyleSheet.creat
|
|
|
4
4
|
container: { marginLeft: 10, marginTop: 10 },
|
|
5
5
|
reviewTitle: {
|
|
6
6
|
fontSize: FONT_SIZE.h2,
|
|
7
|
-
fontWeight: "700",
|
|
8
7
|
lineHeight: 24,
|
|
9
8
|
fontFamily: FONT_FAMILY.primary,
|
|
10
9
|
color: COLORS.BRAND_BLACK,
|
|
11
|
-
marginBottom:7
|
|
10
|
+
marginBottom: 7,
|
|
12
11
|
},
|
|
13
|
-
child: { display:
|
|
12
|
+
child: { display: 'flex', flexDirection: 'row', alignItems: 'center' },
|
|
14
13
|
ratingLabel: {
|
|
15
14
|
fontSize: FONT_SIZE.h2,
|
|
16
|
-
fontWeight: "700",
|
|
17
15
|
lineHeight: 24,
|
|
18
16
|
fontFamily: FONT_FAMILY.secondary,
|
|
19
17
|
color: COLORS.BRAND_BLACK,
|
|
20
18
|
},
|
|
21
19
|
starContainer: { marginLeft: 10 },
|
|
22
|
-
starStyle: { marginHorizontal: 0 }
|
|
20
|
+
starStyle: { marginHorizontal: 0 },
|
|
23
21
|
});
|