UNPKG

@acrool/react-picker

Version:

This is a react method to quickly combine buttons with Picker

13 lines (12 loc) 542 B
import React from 'react'; import { IPickerOption, IValueChange } from '../types'; /** * 產生帶 motion/react 功能的Picker * * 需要呼叫 show 才會傳送到 portal * @param MainComponent * @param DropdownComponent * @param options */ declare function createPicker<V extends {}, P>(MainComponent: React.FC<P & IValueChange<V>>, DropdownComponent: React.FC<P & IValueChange<V>>, options?: IPickerOption): React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<P & IValueChange<V>>>; export default createPicker;