Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-card-modal
Advanced tools
Pure JS animated card modal, similar to google maps or many other UI interfaces out there, it is a functional component and uses hooks, so react 16.3 (or whichever version added hooks) is needed.
yarn add react-native-card-modal
Typescript is there!
Sample code:
import { CardModal } from "react-native-card-modal";
<CardModal
visible={!!selectedPin}
onClose={this.onModalClose}
scrollable
overlay
>
<Text style={{ padding: 20, fontSize: 30, fontWeight: "bold" }}>
Insert your very nice content here
</Text>
</CardModal>;
Works great with react-native-portal if you want to place stuff in front of your other UI elements
visible: boolean;
scrollable: boolean; // If scrollable you can swipe up to expand the card, an "expanded" prop is passed to the child component so you can render different content
overlay?: boolean; // Puts an overlay behind the card
onClose: () => void; // When clicking on the overlay or the function you can call inside your component
style?: StyleProp<any>;
minHeight?: number; // Small card height
maxHeight?: number; // Expanded card height
hideSnack?: boolean; // Hides the snack indicator, so you can place it inside your component
The child component inside the card will get injected 1 prop: expanded: boolean
so you can render content differently when the card is expanded
The component is very simple, if you feel like you need to add a prop open a PR and I'll promptly merge it.
FAQs
Card modal for react-native projects
We found that react-native-card-modal 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.