react-native-arcade-button

🕹️ Arcade button component for React Native

APACHE-2.0 License

Downloads
10
Stars
4
Committers
1

react-native-arcade-button

Live Demo (CodeSandbox)

Installation

npm install --save react-native-arcade-button

Usage

import React from 'react'

import ArcadeButton from 'react-native-arcade-button'

class Foo extends React.Component {

  onClick = (e) => {
    //...do some logic
  }

  render() {
    return (
      <ArcadeButton
        onPressOut={this.onClick}
      >
        <Text>Click</Text>
      </ArcadeButton>
    )
  }
}

Props

name type default desc
children Component null Traditional React children component(s) passed along to label the button. Can be text, icon, etc.
color string null Any rgb, hex, hsv, etc. color supported by StyleSheet.
disabled bool false Disables the button presses, will call onDisabledOut when pressed anyway (for user experience use cases).
onDisabledOut func null When disabled is true, function is called when button is pressed out anyway.
onPressIn func null Function called when button press in.
onPressOut func null Function called when button is released.

License

Made with 🍊 by Chris Dolphin

Package Rankings
Top 18.75% on Npmjs.org
Badges
Extracted from project README
Coverage Status npm Version npm Downloads license license
Related Projects