@bitrise/bitkit 13.196.0 → 13.197.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.196.0",
4
+ "version": "13.197.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -16,6 +16,7 @@ export type LabeledDataProps = BoxProps & {
16
16
  secondaryLabel?: ReactNode;
17
17
  size?: 'sm' | 'md' | 'lg';
18
18
  skeleton?: ReactNode;
19
+ shouldShowTrendSign?: boolean;
19
20
  tooltip?: Omit<TooltipProps, 'children'>;
20
21
  trend?: 'positive' | 'negative' | 'neutral';
21
22
  trendColorScheme?: 'red' | 'green' | 'grey';
@@ -32,6 +33,7 @@ const LabeledData = ({
32
33
  secondaryLabel,
33
34
  size = 'sm',
34
35
  skeleton,
36
+ shouldShowTrendSign = true,
35
37
  tooltip,
36
38
  trend,
37
39
  trendValue,
@@ -39,8 +41,11 @@ const LabeledData = ({
39
41
  ...rest
40
42
  }: LabeledDataProps): JSX.Element => {
41
43
  const trendIconSize = size === 'sm' ? '16' : '24';
42
- const trendSign = trend === 'negative' ? '-' : '+';
43
44
  const labelColor = size === 'sm' ? 'text/primary' : 'text/secondary';
45
+ let trendSign;
46
+ if (shouldShowTrendSign) {
47
+ trendSign = trend === 'negative' ? '-' : '+';
48
+ }
44
49
 
45
50
  let dataSkeletonHeight;
46
51
  let dataSkeletonPaddingY;
@@ -122,9 +127,9 @@ const LabeledData = ({
122
127
  {placeholder}
123
128
  </Box>
124
129
  )}
125
- {((trendSign && trendValue) || !!secondaryLabel) && (
130
+ {(trendValue || !!secondaryLabel) && (
126
131
  <Box as="dd" display="flex" gap="4" color={trendColor} textStyle="body/md/regular">
127
- {trendSign && trendValue && (
132
+ {trendValue && (
128
133
  <>
129
134
  {trendSign}
130
135
  {trendValue}