vpt-sebraeds 0.0.23 → 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
|
{
|
|
@@ -158,12 +159,15 @@ export const DropdownCommitments = () => {
|
|
|
158
159
|
const { height: screenHeight } = Dimensions.get('window');
|
|
159
160
|
|
|
160
161
|
const Dropdown = ({
|
|
162
|
+
title,
|
|
161
163
|
onSelect,
|
|
162
164
|
options = [],
|
|
163
165
|
withSeparator = false,
|
|
164
166
|
isOpen = false,
|
|
165
167
|
isCheckbox = false,
|
|
166
168
|
setIsOpen = () => { },
|
|
169
|
+
confirmButtonLabel,
|
|
170
|
+
onConfirm,
|
|
167
171
|
}) => {
|
|
168
172
|
|
|
169
173
|
const handleSelect = (option) => {
|
|
@@ -281,7 +285,7 @@ const Dropdown = ({
|
|
|
281
285
|
>
|
|
282
286
|
<Icon name="subtract-line" size={26} color="#687499" />
|
|
283
287
|
</TouchableOpacity>
|
|
284
|
-
<Text style={styles.modalTitle}>
|
|
288
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
285
289
|
</View>
|
|
286
290
|
|
|
287
291
|
<FlatList
|
|
@@ -292,6 +296,18 @@ const Dropdown = ({
|
|
|
292
296
|
showsVerticalScrollIndicator={false}
|
|
293
297
|
bounces={false}
|
|
294
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
|
+
)}
|
|
295
311
|
</View>
|
|
296
312
|
</View>
|
|
297
313
|
</TouchableOpacity>
|
|
@@ -367,6 +383,11 @@ const styles = StyleSheet.create({
|
|
|
367
383
|
color: '#333333',
|
|
368
384
|
fontFamily: 'Nunito Sans',
|
|
369
385
|
},
|
|
386
|
+
buttonContainer: {
|
|
387
|
+
paddingHorizontal: 20,
|
|
388
|
+
paddingTop: 16,
|
|
389
|
+
paddingBottom: 8,
|
|
390
|
+
},
|
|
370
391
|
});
|
|
371
392
|
|
|
372
393
|
export default Dropdown;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export function DropdownCommitments(): React.JSX.Element;
|
|
2
2
|
export default Dropdown;
|
|
3
3
|
import React from 'react';
|
|
4
|
-
declare function Dropdown({ onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, }: {
|
|
4
|
+
declare function Dropdown({ title, onSelect, options, withSeparator, isOpen, isCheckbox, setIsOpen, confirmButtonLabel, onConfirm, }: {
|
|
5
|
+
title: any;
|
|
5
6
|
onSelect: any;
|
|
6
7
|
options?: never[] | undefined;
|
|
7
8
|
withSeparator?: boolean | undefined;
|
|
8
9
|
isOpen?: boolean | undefined;
|
|
9
10
|
isCheckbox?: boolean | undefined;
|
|
10
11
|
setIsOpen?: (() => void) | undefined;
|
|
12
|
+
confirmButtonLabel: any;
|
|
13
|
+
onConfirm: any;
|
|
11
14
|
}): React.JSX.Element;
|
|
12
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 = ({ 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);
|
|
@@ -206,10 +207,14 @@ const Dropdown = ({ onSelect, options = [], withSeparator = false, isOpen = fals
|
|
|
206
207
|
<TouchableOpacity onPress={() => setIsOpen(false)} style={styles.closeButton}>
|
|
207
208
|
<Icon name="subtract-line" size={26} color="#687499"/>
|
|
208
209
|
</TouchableOpacity>
|
|
209
|
-
<Text style={styles.modalTitle}>
|
|
210
|
+
<Text style={styles.modalTitle}>{title || "Título"}</Text>
|
|
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;
|