New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@sk39/react-native-action-menu

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sk39/react-native-action-menu

Action menu for React Native

latest
Source
npmnpm
Version
1.0.0-alpha.0
Version published
Maintainers
1
Created
Source

react-native-action-menu

Action menu for React Native.

NPM

menu

Dependencies

Install

npm install @sk39/react-native-action-menu

Usage

Props

PropsDefaultDescription
duration400
centralCircleSize130
circleSpaceSize56
import React, {Component} from 'react';
import {TouchableOpacity, View} from 'react-native';
import {ActionMenu} from "react-native-action-menu";

class Example extends Component {
  menuRef = React.createRef<ActionMenu>();

  onSelect(ev, item) {
    const actions = [
        {
            title: "Show Detail",
            method: ()=>console.log("Show Detail"),
            icon: {name: "eye", type: "feather"},
            color: Colors.primary
        },
        {
            title: "Invest",
            method: ()=>console.log("Show Detail"),
            icon: {name: "shopping-cart", type: "feather"},
            color: Colors.second
        }
    ];

    this.menuRef.current.show({
        title: item.name,
        actions,
        py: ev.nativeEvent.pageY
    })
  }

  render () {
    return (
       <View>
          <TouchableOpacity onPress={ev => this.onSelect(ev, item)}>...</TouchableOpacity>
          <ActionMenu ref={this.menuRef}/>
       </View>
    )
  }
}

License

MIT © sk39

Keywords

react

FAQs

Package last updated on 03 Nov 2020

Did you know?

Socket

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.

Install

Related posts