vpt-sebraeds 0.0.27 → 0.0.28

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.
@@ -304,11 +304,14 @@ const Dropdown = ({
304
304
  ))}
305
305
  </ScrollView>
306
306
 
307
- {confirmButtonLabel && onConfirm && (
307
+ {hasCheckboxes && (
308
308
  <View style={styles.buttonContainer}>
309
309
  <Button
310
- label={confirmButtonLabel}
311
- onPress={onConfirm}
310
+ label={confirmButtonLabel || "Confirmar"}
311
+ onPress={() => {
312
+ if (onConfirm) onConfirm();
313
+ setIsOpen(false);
314
+ }}
312
315
  size="large"
313
316
  variant="filled"
314
317
  expand
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"AA+FO,yDA6DN;;kBA3JkD,OAAO;AA+J1D;;;;;;;;;;sBAkKC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"AA+FO,yDA6DN;;kBA3JkD,OAAO;AA+J1D;;;;;;;;;;sBAqKC"}
@@ -218,8 +218,12 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
218
218
  {options.map((item, index) => (<RenderItem key={index.toString()} item={item} index={index}/>))}
219
219
  </ScrollView>
220
220
 
221
- {confirmButtonLabel && onConfirm && (<View style={styles.buttonContainer}>
222
- <Button label={confirmButtonLabel} onPress={onConfirm} size="large" variant="filled" expand/>
221
+ {hasCheckboxes && (<View style={styles.buttonContainer}>
222
+ <Button label={confirmButtonLabel || "Confirmar"} onPress={() => {
223
+ if (onConfirm)
224
+ onConfirm();
225
+ setIsOpen(false);
226
+ }} size="large" variant="filled" expand/>
223
227
  </View>)}
224
228
  </View>
225
229
  </View>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vpt-sebraeds",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
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",