@umituz/react-native-ai-creations 1.3.9 → 1.3.10
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
|
@@ -22,14 +22,15 @@ interface FilterBottomSheetProps {
|
|
|
22
22
|
onFilterPress: (id: string, categoryId: string) => void;
|
|
23
23
|
onClearFilters: () => void;
|
|
24
24
|
title: string;
|
|
25
|
+
snapPoints?: string[];
|
|
25
26
|
}
|
|
26
27
|
|
|
27
28
|
export const FilterBottomSheet = forwardRef<BottomSheetModalRef, FilterBottomSheetProps>((props, ref) => {
|
|
28
|
-
const { categories, selectedIds, onFilterPress, onClearFilters, title } = props;
|
|
29
|
+
const { categories, selectedIds, onFilterPress, onClearFilters, title, snapPoints: propSnapPoints } = props;
|
|
29
30
|
const tokens = useAppDesignTokens();
|
|
30
31
|
const styles = useStyles(tokens);
|
|
31
32
|
|
|
32
|
-
const snapPoints = useMemo(() => ['50%', '75%'], []);
|
|
33
|
+
const snapPoints = useMemo(() => propSnapPoints || ['50%', '75%'], [propSnapPoints]);
|
|
33
34
|
|
|
34
35
|
const renderOption = useCallback((option: FilterOption, category: FilterCategory) => {
|
|
35
36
|
const isSelected = selectedIds.includes(option.id);
|