@acrool/react-picker 0.0.9-alpha.0 → 0.0.10-alpha.0

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.
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
- import { IValueChange } from '../types';
2
+ import { IPickerOption, IValueChange } from '../types';
3
3
  /**
4
4
  * 產生帶 framer-motion 功能的Picker
5
5
  *
6
6
  * 需要呼叫 show 才會傳送到 portal
7
7
  * @param MainComponent
8
8
  * @param DropdownComponent
9
+ * @param options
9
10
  */
10
- declare function createPicker<V extends {}, P>(MainComponent: React.FC<P & IValueChange<V>>, DropdownComponent: React.FC<P & IValueChange<V>>): React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<P & IValueChange<V>>>;
11
+ 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>>>;
11
12
  export default createPicker;
package/dist/types.d.ts CHANGED
@@ -19,6 +19,10 @@ export interface IValueChange<T = string> {
19
19
  value?: T;
20
20
  onChange?: (value: T) => void;
21
21
  }
22
+ export interface IPickerOption {
23
+ isEnableHideSave?: boolean;
24
+ isEnableClickOutSiteHidden?: boolean;
25
+ }
22
26
  export declare enum EKeyboardKey {
23
27
  Escape = "Escape",
24
28
  Enter = "Enter",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrool/react-picker",
3
- "version": "0.0.9-alpha.0",
3
+ "version": "0.0.10-alpha.0",
4
4
  "description": "This is a react method to quickly combine buttons with Picker",
5
5
  "keywords": [
6
6
  "acrool",