2.1.5 • Published 5 months ago

@types/react-native-modal-filter-picker v2.1.5

Weekly downloads
63
License
MIT
Repository
github
Last release
5 months ago

Installation

npm install --save @types/react-native-modal-filter-picker

Summary

This package contains type definitions for react-native-modal-filter-picker (https://github.com/hiddentao/react-native-modal-filter-picker#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-modal-filter-picker.

index.d.ts

// Type definitions for react-native-modal-filter-picker 2.1
// Project: https://github.com/hiddentao/react-native-modal-filter-picker#readme
// Definitions by: Chang Yanwei <https://github.com/ywchang>
//                 Cheng Gibson <https://github.com/nossbigg>
//                 Zheng Arnaud <https://github.com/arnaud-zg>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8

import * as React from 'react';
import {
  StyleProp,
  ViewStyle,
  TextStyle,
  KeyboardAvoidingView,
  ModalProps,
  FlatListProps,
} from 'react-native';

export interface ModalFilterPickerOption {
    label: string;
    key: string;
}

export interface ModalFilterPickerProps<T extends ModalFilterPickerOption> {
    options: T[];
    onSelect: (key: string) => void;
    onCancel: () => void;
    placeholderText?: string | undefined;
    placeholderTextColor?: string | undefined;
    androidUnderlineColor?: string | undefined;
    cancelButtonText?: string | undefined;
    title?: string | undefined;
    noResultsText?: string | undefined;
    visible?: boolean | undefined;
    showFilter?: boolean | undefined;
    modal?: ModalProps | undefined;
    selectedOption?: string | undefined;
    flatListProps?: Partial<FlatListProps<T>> | undefined;
    renderOption?: ((option: T, isSelected: boolean) => JSX.Element) | undefined;
    renderList?: (() => JSX.Element) | undefined;
    renderCancelButton?: (() => JSX.Element) | undefined;
    keyboardShouldPersistTaps?: 'never' | 'always' | 'handle' | undefined;
    autoFocus?: boolean | undefined;

    // styling props
    overlayStyle?: StyleProp<KeyboardAvoidingView | ViewStyle> | undefined;
    listContainerStyle?: StyleProp<ViewStyle> | undefined;
    filterTextInputContainerStyle?: StyleProp<ViewStyle> | undefined;
    filterTextInputStyle?: StyleProp<TextStyle> | undefined;
    cancelContainerStyle?: StyleProp<ViewStyle> | undefined;
    cancelButtonStyle?: StyleProp<ViewStyle> | undefined;
    cancelButtonTextStyle?: StyleProp<TextStyle> | undefined;
    titleTextStyle?: StyleProp<TextStyle> | undefined;
    optionTextStyle?: StyleProp<TextStyle> | undefined;
    selectedOptionTextStyle?: StyleProp<TextStyle> | undefined;
}

declare class ModalFilterPicker<T extends ModalFilterPickerOption> extends React.Component<
ModalFilterPickerProps<T>
> {}

export default ModalFilterPicker;

Additional Details

Credits

These definitions were written by Chang Yanwei, Cheng Gibson, and Zheng Arnaud.

2.1.5

5 months ago

2.1.4

5 months ago

2.1.2

7 months ago

2.1.1

8 months ago

2.1.3

6 months ago

2.1.0

2 years ago

1.3.3

3 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago