Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wxh16144 committed Aug 1, 2023
1 parent 5c5dd9f commit e9f9c0d
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/api/use-easy-antd-modal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: useEasyAntdModal
description: 上下文 Hook
order: 2
group: Hooks
---

## 简介

该 Hook 用于获取 EasyAntdModal 的上下文, 通过该 Hook 可以获取到 Modal 的配置

```tsx
import { useEasyAntdModal } from 'easy-antd-modal';

export default () => {
const { triggerProps, contentProps } = useEasyAntdModal();
return (
<>
<p>triggerProps: {JSON.stringify(triggerProps)}</p>
<p>contentProps: {JSON.stringify(contentProps)}</p>
</>
);
};
```

## API

| 参数 | 说明 | 类型 | 默认值 |
| ------------ | -------------------- | --------------------- | ---------- |
| triggerProps | Modal 触发器的 props | `trigger \| children` | `trigger` |
| contentProps | Modal 内容的 props | `children \| content` | `children` |

0 comments on commit e9f9c0d

Please sign in to comment.