https://github.com/orzhtml/react-native-orzhtml-popup
popup
https://github.com/orzhtml/react-native-orzhtml-popup
Last synced: 8 months ago
JSON representation
popup
- Host: GitHub
- URL: https://github.com/orzhtml/react-native-orzhtml-popup
- Owner: orzhtml
- License: mit
- Created: 2022-12-12T09:26:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-10T15:06:53.000Z (almost 3 years ago)
- Last Synced: 2025-08-09T14:44:06.529Z (10 months ago)
- Language: TypeScript
- Size: 1.36 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# react-native-orzhtml-popup
### Alert 提示框
##### 参数
* `title`:弹窗标题,可以为字符串或者 React 组件。
* `options`:弹窗配置选项,具体选项如下:
参数名称 | 类型 | 默认值 | 描述
------ | ------ | ------ | ------
`message`| `string` 或 `React.ReactNode`|`-`|弹窗的提示信息,可以为字符串或者 React 组件。
`onOk`|`() => void`|`-`|确认按钮点击后的回调。
`okText`| `string` | `确认` |确认按钮的文本内容。
`onCancel`|`() => void`|`-`|取消按钮点击后的回调。
`cancelText`|`string`|取消|取消按钮的文本内容。
`buttons`|`AlertButtonType[]`|`[]`|弹窗的按钮组。
`alertOptions`|`{ only?: boolean, modal?: boolean, type?: 'zoomIn' | 'zoomOut' | 'fade' | 'custom' | 'none' }`|`{ only: true, modal: true, type: 'zoomIn' }`|弹窗的配置选项。
`AlertButtonType`
参数
* `banClosed`:是否禁止关闭弹窗,默认为 false。
* `onPress`:按钮点击后的回调函数。
* `style`:按钮的样式类型,可选值为 default、cancel、warning。
* `text`:按钮的文本内容