Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
action-sheet-rn
Advanced tools
Probably the most declarative API for ActionSheets in React Native
$ yarn add action-sheet-rn
import { ActionSheet, SheetItem, SheetDivider } from "action-sheet-rn";
// Icons can be defined as:
// const ShareIcon = <Image source={require("./share.png")} />
// const CreateIcon = <Image source={require("./create.png")} />
// const RemoveIcon = <Image source={require("./remove.png")} />
// const LocateIcon = <Image source={require("./locate.png")} />
// const ShareIcon = <Image source={require("./remove.png")} />
const App = ({ isVisible }) =>
isVisible && (
<ActionSheet title="What do you want to do?">
<SheetItem Icon={ShareIcon} onPress={handleShare}>
Share
</SheetItem>
<SheetItem Icon={CreateIcon} onPress={handleCreate}>
Create
</SheetItem>
<SheetItem Icon={RemoveIcon} type="remove" onPress={handleRemove}>
Remove
</SheetItem>
<SheetDivider />
<SheetItem Icon={LocateIcon} onPress={handleLocate}>
Locate
</SheetItem>
<SheetItem type="cancel" onPress={handleCancel}>
Cancel
</SheetItem>
</ActionSheet>
);
It displays a native ActionSheet
using ActionSheetIOS.
On a SheetItem
, you can specify a type
of value cancel | remove
that will allow to customize its style (positionning the cancel button to the bottom and adding the red style of the remove one).
The Icon
prop has no effect on the iOS Action Sheet. It's only relevant for Android
It displays a custom and JavaScript implementation of a Modal Bottom Sheet from the Material Design Spec. For now, it's not implemented 100%, but I really hope it will (missing the gesture handling + the number of visible items etc..)
On Android, the SheetItem
with the cancel
type won't be visible. Instead, the lib will handle the click on the opaque zone as a cancellation (only when the type="cancel"
is provided to keep consistency between iOS and Android).
You can also pass an Icon
props to the SheetItem
so that it adds a little Icon on the left, always following the spec concerning size / margins.
The remove
type as no specific effects on Android.
FAQs
Probably the most declarative API for ActionSheets in React Native
The npm package action-sheet-rn receives a total of 11 weekly downloads. As such, action-sheet-rn popularity was classified as not popular.
We found that action-sheet-rn 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.