vpt-sebraeds 0.0.24 → 0.0.25
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.
|
@@ -4,6 +4,7 @@ import { Animated, View, Text, ScrollView, TouchableOpacity, FlatList, StyleShee
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import ContentCard from '../ContentCard';
|
|
6
6
|
import Checkbox from '../Checkbox';
|
|
7
|
+
import Button from '../Button';
|
|
7
8
|
|
|
8
9
|
const commitmentsData = [
|
|
9
10
|
{
|
|
@@ -165,6 +166,8 @@ const Dropdown = ({
|
|
|
165
166
|
isOpen = false,
|
|
166
167
|
isCheckbox = false,
|
|
167
168
|
setIsOpen = () => { },
|
|
169
|
+
confirmButtonLabel,
|
|
170
|
+
onConfirm,
|
|
168
171
|
}) => {
|
|
169
172
|
|
|
170
173
|
const handleSelect = (option) => {
|
|
@@ -293,6 +296,18 @@ const Dropdown = ({
|
|
|
293
296
|
showsVerticalScrollIndicator={false}
|
|
294
297
|
bounces={false}
|
|
295
298
|
/>
|
|
299
|
+
|
|
300
|
+
{confirmButtonLabel && onConfirm && (
|
|
301
|
+
<View style={styles.buttonContainer}>
|
|
302
|
+
<Button
|
|
303
|
+
label={confirmButtonLabel}
|
|
304
|
+
onPress={onConfirm}
|
|
305
|
+
size="large"
|
|
306
|
+
variant="filled"
|
|
307
|
+
expand
|
|
308
|
+
/>
|
|
309
|
+
</View>
|
|
310
|
+
)}
|
|
296
311
|
</View>
|
|
297
312
|
</View>
|
|
298
313
|
</TouchableOpacity>
|
|
@@ -368,6 +383,11 @@ const styles = StyleSheet.create({
|
|
|
368
383
|
color: '#333333',
|
|
369
384
|
fontFamily: 'Nunito Sans',
|
|
370
385
|
},
|
|
386
|
+
buttonContainer: {
|
|
387
|
+
paddingHorizontal: 20,
|
|
388
|
+
paddingTop: 16,
|
|
389
|
+
paddingBottom: 8,
|
|
390
|
+
},
|
|
371
391
|
});
|
|
372
392
|
|
|
373
393
|
export default Dropdown;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function DropdownCommitments(): React.JSX.Element;
|
|
2
2
|
export default Dropdown;
|
|
3
3
|
import React from 'react';
|
|
4
|
-
declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, }: {
|
|
4
|
+
declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, confirmButtonLabel, onConfirm, }: {
|
|
5
5
|
title: any;
|
|
6
6
|
onSelect: any;
|
|
7
7
|
options?: never[] | undefined;
|
|
@@ -9,5 +9,7 @@ declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isC
|
|
|
9
9
|
isOpen?: boolean | undefined;
|
|
10
10
|
isCheckbox?: boolean | undefined;
|
|
11
11
|
setIsOpen?: (() => void) | undefined;
|
|
12
|
+
confirmButtonLabel: any;
|
|
13
|
+
onConfirm: any;
|
|
12
14
|
}): React.JSX.Element;
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../components/Dropdown/index.jsx"],"names":[],"mappings":"AA+FO,yDA6DN;;kBA3JkD,OAAO;AA+J1D;;;;;;;;;;sBA4JC"}
|
|
@@ -4,6 +4,7 @@ import { Animated, View, Text, ScrollView, TouchableOpacity, FlatList, StyleShee
|
|
|
4
4
|
import Icon from '../Icon';
|
|
5
5
|
import ContentCard from '../ContentCard';
|
|
6
6
|
import Checkbox from '../Checkbox';
|
|
7
|
+
import Button from '../Button';
|
|
7
8
|
const commitmentsData = [
|
|
8
9
|
{
|
|
9
10
|
title: 'Evento 1',
|
|
@@ -134,7 +135,7 @@ export const DropdownCommitments = () => {
|
|
|
134
135
|
</View>);
|
|
135
136
|
};
|
|
136
137
|
const { height: screenHeight } = Dimensions.get('window');
|
|
137
|
-
const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen = false, isCheckbox = false, setIsOpen = () => { }, }) => {
|
|
138
|
+
const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen = false, isCheckbox = false, setIsOpen = () => { }, confirmButtonLabel, onConfirm, }) => {
|
|
138
139
|
const handleSelect = (option) => {
|
|
139
140
|
if (onSelect)
|
|
140
141
|
onSelect(option);
|
|
@@ -210,6 +211,10 @@ const Dropdown = ({ title, onSelect, options = [], withSeparator = false, isOpen
|
|
|
210
211
|
</View>
|
|
211
212
|
|
|
212
213
|
<FlatList data={options} renderItem={(props) => <RenderItem {...props}/>} keyExtractor={(item, index) => index.toString()} style={styles.optionsList} showsVerticalScrollIndicator={false} bounces={false}/>
|
|
214
|
+
|
|
215
|
+
{confirmButtonLabel && onConfirm && (<View style={styles.buttonContainer}>
|
|
216
|
+
<Button label={confirmButtonLabel} onPress={onConfirm} size="large" variant="filled" expand/>
|
|
217
|
+
</View>)}
|
|
213
218
|
</View>
|
|
214
219
|
</View>
|
|
215
220
|
</TouchableOpacity>
|
|
@@ -283,5 +288,10 @@ const styles = StyleSheet.create({
|
|
|
283
288
|
color: '#333333',
|
|
284
289
|
fontFamily: 'Nunito Sans',
|
|
285
290
|
},
|
|
291
|
+
buttonContainer: {
|
|
292
|
+
paddingHorizontal: 20,
|
|
293
|
+
paddingTop: 16,
|
|
294
|
+
paddingBottom: 8,
|
|
295
|
+
},
|
|
286
296
|
});
|
|
287
297
|
export default Dropdown;
|