New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@expo/react-native-action-sheet

Package Overview
Dependencies
Maintainers
11
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/react-native-action-sheet - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

lib/commonjs/ActionSheet/ActionGroup.js

61

package.json
{
"name": "@expo/react-native-action-sheet",
"version": "3.0.1",
"version": "3.0.2",
"description": "A cross-platform ActionSheet for React Native",
"main": "build/index.js",
"types": "build/index.d.ts",
"react-native": "src/index.ts",
"types": "lib/typescript/src/index.d.ts",
"main": "lib/commonjs/index.js",
"module": "lib/module/index.js",
"files": [
"lib/",
"src/"
],
"scripts": {
"build": "expo-module build",
"clean": "expo-module clean",
"lint:prettier": "yarn prettier src/**/*.{ts,tsx} --write"
"build": "bob build",
"type-check": "tsc --noEmit",
"lint": "eslint . --ext .ts,.tsx --fix",
"fmt": "prettier --write \"{src,example}/**/*.{ts,tsx}\""
},

@@ -28,12 +35,42 @@ "repository": {

"devDependencies": {
"@types/react": "^16.8.8",
"@types/react-native": "^0.57.41",
"expo-module-scripts": "^1.0.0",
"prettier": "^1.16.4",
"react": "^16.8.4",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz"
"@react-native-community/bob": "^0.6.1",
"@react-native-community/eslint-config": "^0.0.5",
"@types/react": "^16.8.23",
"@types/react-native": "^0.57.65",
"@typescript-eslint/eslint-plugin": "^1.12.0",
"@typescript-eslint/parser": "^1.12.0",
"eslint": "^6.0.1",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-prettier": "3.1.0",
"husky": "^3.0.0",
"lint-staged": "^9.2.0",
"prettier": "^1.18.2",
"react": "^16.8.6",
"react-native": "https://github.com/expo/react-native/archive/sdk-33.0.0.tar.gz",
"typescript": "^3.5.3"
},
"peerDependencies": {
"react": ">=16.3.0"
},
"@react-native-community/bob": {
"source": "src",
"output": "lib",
"targets": [
"commonjs",
"module",
"typescript"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,ts,tsx}": [
"yarn lint",
"yarn fmt",
"git add"
]
}
}

63

README.md

@@ -5,10 +5,16 @@ # react-native-action-sheet [![Slack](https://slack.expo.io/badge.svg)](https://slack.expo.io)

| iOS | Android | Web |
|---------------------------|---------------------------|---------------------------|
| <img src="https://raw.githubusercontent.com/expo/react-native-action-sheet/master/gif/ios.gif" width="200" height="400"/> | <img src="https://raw.githubusercontent.com/expo/react-native-action-sheet/master/gif/android.gif" width="200" height="400"/> | <img src="https://raw.githubusercontent.com/expo/react-native-action-sheet/master/gif/web.gif" width="300" height="400"/> |
## Installation
```
npm install @expo/react-native-action-sheet -S
$ npm install @expo/react-native-action-sheet -S
```
or
```
yarn add @expo/react-native-action-sheet
$ yarn add @expo/react-native-action-sheet
```

@@ -18,5 +24,5 @@

### 1. import connectActionSheet function and connect your component which uses showActionSheetWithOptions.
### 1. Connect your component which uses showActionSheetWithOptions.
```es6
import { connectActionSheet } from '@expo/react-native-action-sheet';
import { connectActionSheet } from '@expo/react-native-action-sheet'

@@ -32,3 +38,3 @@ class App extends React.Component {

`App` component can access actionSheet method as `this.props.showActionSheetWithOptions`
`App` component can access the actionSheet method as `this.props.showActionSheetWithOptions`

@@ -55,7 +61,8 @@ ```es6

### 2. import ActionSheetProvider and wrap your top-level component with `<ActionSheetProvider />`
### 2. Wrap your top-level component with `<ActionSheetProvider />`
```es6
import { ActionSheetProvider } from '@expo/react-native-action-sheet';
import { ActionSheetProvider } from '@expo/react-native-action-sheet'
class AppContainer extends React.Component {

@@ -72,5 +79,2 @@ render() {

## Web Setup
WIP
## Options

@@ -129,9 +133,42 @@

See the [example app](https://github.com/expo/react-native-action-sheet/tree/master/example) for examples of how to apply different options.
See the [example app](https://github.com/expo/react-native-action-sheet/tree/master/example).
### Usage
```
$ cd exmaple
$ yarn
$ cd example
$ yarn
// build simulator
$ yarn ios
$ yarn android
// web
$ yarn web
```
## Development
### Setup
```
$ git clone git@github.com:expo/react-native-action-sheet.git
$ cd react-native-action-sheet
$ yarn install
```
### Build
We use [bob](https://github.com/react-native-community/bob).
```
$ yarn build
```
### Lint & Format
```
// tsc
$ yarn type-check
// ESLint
$ yarn lint
// prettier
$ yarn fmt
```
import * as React from 'react';
import { ActionSheetOptions } from './types';
export type Context = {
export interface Context {
showActionSheetWithOptions: (options: ActionSheetOptions, callback: (i: number) => void) => void;
};
}

@@ -8,0 +8,0 @@ const { Provider, Consumer } = React.createContext<Context>({

@@ -16,3 +16,3 @@ import * as React from 'react';

export interface ActionSheetOptions extends ActionSheetIOSOptions {
icons?: Array<React.ReactNode>;
icons?: React.ReactNode[];
tintIcons?: boolean;

@@ -19,0 +19,0 @@ textStyle?: TextStyle;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc