
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@rn-common/dialog
Advanced tools
The `Dialog` component is a customizable modal dialog built with React Native and Reanimated. It provides smooth animations, a backdrop overlay, and the ability to handle user interactions like hardware back button presses.
The Dialog
component is a customizable modal dialog built with React Native and Reanimated. It provides smooth animations, a backdrop overlay, and the ability to handle user interactions like hardware back button presses.
react-native-reanimated
for seamless transitions.Install using:
yarn @rn-common/dialog
import React from 'react'
import { Button, Text, View } from 'react-native'
import { Dialog } from './Dialog'
export default function App() {
const [visible, setVisible] = React.useState(false)
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Button title="Show Dialog" onPress={() => setVisible(true)} />
<Dialog
show={visible}
onRequestClose={() => setVisible(false)}
backdropColor="rgba(0, 0, 0, 0.7)"
>
<View
style={{
padding: 20,
backgroundColor: 'white',
borderRadius: 10,
alignItems: 'center',
}}
>
<Text>Hello, this is a dialog!</Text>
<Button title="Close" onPress={() => setVisible(false)} />
</View>
</Dialog>
</View>
)
}
Prop | Type | Default | Description |
---|---|---|---|
cancelable | boolean | true | Whether the dialog can be dismissed by tapping the backdrop or back button. |
children | ReactNode | Required | The content to display inside the dialog. |
show | boolean | false | Controls the visibility of the dialog. |
onRequestClose | () => void | undefined | Callback invoked when the dialog is requested to close. |
backdropColor | string | 'rgba(0,0,0,0.5)' | Color of the backdrop overlay. |
You can customize the dialog further by modifying the styles or providing additional props to the children
.
This project is licensed under the MIT License.
FAQs
The `Dialog` component is a customizable modal dialog built with React Native and Reanimated. It provides smooth animations, a backdrop overlay, and the ability to handle user interactions like hardware back button presses.
The npm package @rn-common/dialog receives a total of 6 weekly downloads. As such, @rn-common/dialog popularity was classified as not popular.
We found that @rn-common/dialog demonstrated a healthy version release cadence and project activity because the last version was released less than 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
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.