UNPKG

react-native-ui-lib

Version:

<p align="center"> <img src="https://user-images.githubusercontent.com/1780255/105469025-56759000-5ca0-11eb-993d-3568c1fd54f4.png" height="250px" style="display:block"/> </p> <p align="center">UI Toolset & Components Library for React Native</p> <p a

56 lines (55 loc) 1.74 kB
import React from 'react'; import { TextFieldProps } from '../TextField'; import { ChipProps } from '../../components/chip'; export declare enum ChipsInputChangeReason { Added = "added", Removed = "removed" } export declare type ChipsInputChipProps = ChipProps & { invalid?: boolean; }; export declare type ChipsInputProps = Omit<TextFieldProps, 'ref'> & { /** * Chip items to render in the input */ chips?: ChipsInputChipProps[]; /** * A default set of chip props to pass to all chips */ defaultChipProps?: ChipProps; /** * A default set of chip props to pass to all invalid chips */ invalidChipProps?: ChipProps; /** * Change callback for when chips changed (either added or removed) */ onChange?: (chips: ChipsInputChipProps[], changeReason: ChipsInputChangeReason, updatedChip: ChipProps) => void; /** * Maximum chips */ maxChips?: number; }; declare const ChipsInput: React.ForwardRefExoticComponent<Omit<TextFieldProps, "ref"> & { /** * Chip items to render in the input */ chips?: ChipsInputChipProps[] | undefined; /** * A default set of chip props to pass to all chips */ defaultChipProps?: ChipProps | undefined; /** * A default set of chip props to pass to all invalid chips */ invalidChipProps?: ChipProps | undefined; /** * Change callback for when chips changed (either added or removed) */ onChange?: ((chips: ChipsInputChipProps[], changeReason: ChipsInputChangeReason, updatedChip: ChipProps) => void) | undefined; /** * Maximum chips */ maxChips?: number | undefined; } & React.RefAttributes<any>>; export default ChipsInput;