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

react-native-options-button

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-options-button

A fully customizable bottom animated options button.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
7
-58.82%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-options-button

A fully customizable bottom animated options button.

Options button demo

Motivation

With bigger screens, actions should be moved to the bottom of the screen in order to be more accessible.

Installation

$ yarn add react-native-options-button

Usage

/* @flow */

import React from 'react'
import { View } from 'react-native'
import { OptionsButton } from 'react-native-options-button'

class App extends React.Component {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <OptionsButton
          items={[
            { title: 'Title 1', id: 0, onPress: () => null },
            { title: 'Title 2', id: 1, onPress: () => null },
            { title: 'Title 3', id: 2, onPress: () => null },
            { title: 'Title 4', id: 3, onPress: () => null },
            { title: 'Title 5', id: 4, onPress: () => null },
            { title: 'Title 6', id: '5', onPress: () => null }
          ]}
          title="Menu"
          openTitle="Close"
          onPress={(i, z) => console.log(i, z)}
          buttonStyle={{ borderRadius: 0 }}
          optionsStyle={{ borderRadius: 8 }}
          buttonTextStyle={{ color: 'white' }}
          containerStyle={{ bottom: 15 }}
        />
      </View>
    )
  }
}

export default App

API

OptionsButton API

OptionItem

type OptionItem = {
  title: string,
  id: string | number,
  onPress?: Function
}
PropTypeRequired
itemsArray<OptionItem>Yes
titlestringYes
openTitlestringYes
onPressFunction
colorstring
openedColorstring
isLoadingboolean
containerStyleany
buttonStyleany
buttonTextStyleany
optionsStyleany
optionTextStyleany
separatorStyleany

License

MIT.

Author

Álvaro Medina Ballester amedina at apsl dot net

Keywords

react

FAQs

Package last updated on 14 Sep 2018

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