Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
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 1 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.