@acrool/react-picker 0.1.1-alpha.0 → 0.1.1
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/README.md +24 -1
- package/dist/MotionDrawer/MotionDrawer.d.ts +1 -0
- package/dist/MotionDrawer/config.d.ts +3 -0
- package/dist/acrool-react-picker.es.js +689 -5359
- package/dist/style.css +1 -1
- package/dist/types.d.ts +3 -4
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -34,9 +34,18 @@
|
|
|
34
34
|
## Install
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
yarn add @acrool/react-picker
|
|
37
|
+
yarn add framer-motion @acrool/react-picker
|
|
38
38
|
```
|
|
39
39
|
|
|
40
|
+
in your packages. (Make the version of styled-component you use match the version of styled-component used in acrool-react-gird)
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
"resolutions": {
|
|
44
|
+
"framer-motion": "^11.x"
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
40
49
|
## Usage
|
|
41
50
|
|
|
42
51
|
add in your index.tsx
|
|
@@ -192,6 +201,20 @@ const DateTimeFieldAfter = (props: IProps, ref?: ForwardedRef<HTMLElement>) => {
|
|
|
192
201
|
```
|
|
193
202
|
|
|
194
203
|
|
|
204
|
+
## There is an onClick event in the outer layer, causing the picker to click and trigger
|
|
205
|
+
|
|
206
|
+
It should be set in the outer layer to prevent bubbling.
|
|
207
|
+
|
|
208
|
+
```tsx
|
|
209
|
+
const handleOnClick = (e: React.MouseEvent) => {
|
|
210
|
+
e.stopPropagation();
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return <DropdownRoot onClick={handleOnClick}>
|
|
214
|
+
<DropTitle>{i18n('page.workspaceTask.action.subTask', {def: 'SubTask'})}</DropTitle>
|
|
215
|
+
</DropdownRoot>;
|
|
216
|
+
```
|
|
217
|
+
|
|
195
218
|
## License
|
|
196
219
|
|
|
197
220
|
MIT © [Acrool](https://github.com/acrool) & [Imagine](https://github.com/imagine10255)
|
|
@@ -4,6 +4,7 @@ interface IProps {
|
|
|
4
4
|
isDebug?: boolean;
|
|
5
5
|
anchorRef: RefObject<HTMLDivElement>;
|
|
6
6
|
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
7
|
+
isVisibleMask?: boolean;
|
|
7
8
|
}
|
|
8
9
|
declare const _default: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
10
|
export default _default;
|