
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
react-native-custom-dialog
Advanced tools
React Native 自定义Dialog组件
Dialog类别 | iOS | Android |
---|---|---|
图片头部 + 标题 | ![]() | ![]() |
图片头部 + 内容 | ![]() | ![]() |
标题 + 内容 | ![]() | ![]() |
只有标题 | ![]() | ![]() |
只有内容 | ![]() | ![]() |
标题 + 内容图片 + 内容 | ![]() | ![]() |
标题 + 内容 + 竖直排列按钮 | ![]() | ![]() |
自定义内容 | ![]() | ![]() |
npm i react-native-custom-dialog --save
import React, {Component} from 'react';
import CustomDialog from 'react-native-custom-dialog';
//...
export default class index extends Component {
render() {
return (
<CustomDialog ref={customDialog => {this.customDialog = customDialog}}/>
)
}
}
this.customDialog.show({
headerImg: require('顶部区域图片uri'),
title: "标题",
content: "内容",
actions: [
{name: "确定", func: () => {global.toast("确定") }, style: {color: "#0b80bb"}},
{name: "取消"},
], // 按钮
horizontal: true/false, // 按钮是否水平排列
cancelable: true/false, // 是否可取消
contentImg: require('内容区域图片uri'),
contentStretch: true/false, // 内容区域是否可延展
contentStyle: {}, // 内容区域包裹样式
titleStyle: {}, // 标题区域包裹样式
})
show(option)
hide()
reset()
show()
之前先重置,调用 reset()
。FAQs
React Native 自定义Dialog组件
The npm package react-native-custom-dialog receives a total of 5 weekly downloads. As such, react-native-custom-dialog popularity was classified as not popular.
We found that react-native-custom-dialog demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.