vpt-sebraeds 0.0.83 → 0.0.85
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.
|
@@ -10,7 +10,9 @@ const ProgressBar = ({
|
|
|
10
10
|
total,
|
|
11
11
|
completed = 0,
|
|
12
12
|
color = '#193AB8',
|
|
13
|
-
showLabel = true
|
|
13
|
+
showLabel = true,
|
|
14
|
+
style,
|
|
15
|
+
barStyle,
|
|
14
16
|
}) => {
|
|
15
17
|
const percent = Math.round(progress * 100);
|
|
16
18
|
|
|
@@ -18,8 +20,8 @@ const ProgressBar = ({
|
|
|
18
20
|
const progressPercent = (completed / total) * 100;
|
|
19
21
|
|
|
20
22
|
return (
|
|
21
|
-
<View style={[styles.container, { opacity }]}>
|
|
22
|
-
<View style={styles.barBackground}>
|
|
23
|
+
<View style={[styles.container, { opacity }, style]}>
|
|
24
|
+
<View style={[styles.barBackground, barStyle]}>
|
|
23
25
|
<View style={[styles.barFill, { width: `${progressPercent}%`, backgroundColor: color }]} />
|
|
24
26
|
</View>
|
|
25
27
|
{showLabel && (
|
|
@@ -34,8 +36,8 @@ const ProgressBar = ({
|
|
|
34
36
|
}
|
|
35
37
|
|
|
36
38
|
return (
|
|
37
|
-
<View style={[styles.container, { opacity }]}>
|
|
38
|
-
<View style={styles.barBackground}>
|
|
39
|
+
<View style={[styles.container, { opacity }, style]}>
|
|
40
|
+
<View style={[styles.barBackground, barStyle]}>
|
|
39
41
|
<View style={[styles.barFill, { width: `${percent}%`, backgroundColor: color }]} />
|
|
40
42
|
</View>
|
|
41
43
|
{showLabel && (
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default ProgressBar;
|
|
2
|
-
declare function ProgressBar({ progress, label, opacity, variant, total, completed, color, showLabel }: {
|
|
2
|
+
declare function ProgressBar({ progress, label, opacity, variant, total, completed, color, showLabel, style, barStyle, }: {
|
|
3
3
|
progress: any;
|
|
4
4
|
label: any;
|
|
5
5
|
opacity?: number | undefined;
|
|
@@ -8,6 +8,8 @@ declare function ProgressBar({ progress, label, opacity, variant, total, complet
|
|
|
8
8
|
completed?: number | undefined;
|
|
9
9
|
color?: string | undefined;
|
|
10
10
|
showLabel?: boolean | undefined;
|
|
11
|
+
style: any;
|
|
12
|
+
barStyle: any;
|
|
11
13
|
}): React.JSX.Element;
|
|
12
14
|
import React from 'react';
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ProgressBar/index.jsx"],"names":[],"mappings":";AAIA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/ProgressBar/index.jsx"],"names":[],"mappings":";AAIA;;;;;;;;;;;sBA2CC;kBA/CiB,OAAO"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { View, Text, StyleSheet } from 'react-native';
|
|
3
3
|
import { fontFamily } from '../utils/fontFamily';
|
|
4
|
-
const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', total, completed = 0, color = '#193AB8', showLabel = true }) => {
|
|
4
|
+
const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', total, completed = 0, color = '#193AB8', showLabel = true, style, barStyle, }) => {
|
|
5
5
|
const percent = Math.round(progress * 100);
|
|
6
6
|
if (variant === 'segmented') {
|
|
7
7
|
const progressPercent = (completed / total) * 100;
|
|
8
|
-
return (<View style={[styles.container, { opacity }]}>
|
|
9
|
-
<View style={styles.barBackground}>
|
|
8
|
+
return (<View style={[styles.container, { opacity }, style]}>
|
|
9
|
+
<View style={[styles.barBackground, barStyle]}>
|
|
10
10
|
<View style={[styles.barFill, { width: `${progressPercent}%`, backgroundColor: color }]}/>
|
|
11
11
|
</View>
|
|
12
12
|
{showLabel && (<View style={styles.labelContainer}>
|
|
@@ -16,8 +16,8 @@ const ProgressBar = ({ progress, label, opacity = 1, variant = 'continuous', tot
|
|
|
16
16
|
</View>)}
|
|
17
17
|
</View>);
|
|
18
18
|
}
|
|
19
|
-
return (<View style={[styles.container, { opacity }]}>
|
|
20
|
-
<View style={styles.barBackground}>
|
|
19
|
+
return (<View style={[styles.container, { opacity }, style]}>
|
|
20
|
+
<View style={[styles.barBackground, barStyle]}>
|
|
21
21
|
<View style={[styles.barFill, { width: `${percent}%`, backgroundColor: color }]}/>
|
|
22
22
|
</View>
|
|
23
23
|
{showLabel && (<Text style={styles.label}>{label ?? `${percent}% concluído`}</Text>)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vpt-sebraeds",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.85",
|
|
4
4
|
"description": "Biblioteca de componentes React Native do Sebrae",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -122,4 +122,4 @@
|
|
|
122
122
|
"react-native-web": "^0.20.0"
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
|
-
}
|
|
125
|
+
}
|