Skip to content

Commit

Permalink
docs(useLongPress): change options to default (alibaba#2479)
Browse files Browse the repository at this point in the history
  • Loading branch information
coding-ice authored and raotaohub committed Mar 28, 2024
1 parent 514df66 commit 15675cb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/src/useLongPress/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Listen for the long press event of the target element.
useLongPress(
onLongPress: (event: MouseEvent | TouchEvent) => void,
target: Target,
options?: {
options: {
delay?: number;
moveThreshold?: { x?: number; y?: number };
onClick?: (event: MouseEvent | TouchEvent) => void;
Expand All @@ -42,7 +42,7 @@ useLongPress(
| ----------- | ---------------------------- | ----------------------------------------------------------- | ------- |
| onLongPress | Trigger function | `(event: MouseEvent \| TouchEvent) => void` | - |
| target | DOM node or Ref | `Element` \| `() => Element` \| `MutableRefObject<Element>` | - |
| options | Optional configuration items | `Options` | - |
| options | Optional configuration items | `Options` | `{}` |

### Options

Expand Down
4 changes: 2 additions & 2 deletions packages/hooks/src/useLongPress/index.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ nav:
useLongPress(
onLongPress: (event: MouseEvent | TouchEvent) => void,
target: Target,
options?: {
options: {
delay?: number;
moveThreshold?: { x?: number; y?: number };
onClick?: (event: MouseEvent | TouchEvent) => void;
Expand All @@ -42,7 +42,7 @@ useLongPress(
| ----------- | ---------------- | ----------------------------------------------------------- | ------ |
| onLongPress | 触发函数 | `(event: MouseEvent \| TouchEvent) => void` | - |
| target | DOM 节点或者 Ref | `Element` \| `() => Element` \| `MutableRefObject<Element>` | - |
| options | 可选配置项 | `Options` | - |
| options | 可选配置项 | `Options` | `{}` |

### Options

Expand Down

0 comments on commit 15675cb

Please sign in to comment.