0.2.2 • Published 6 years ago

react-native-arcade-button v0.2.2

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
6 years ago

react-native-arcade-button

Build Status Coverage Status

npm Version npm Downloads license

screenshot

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

nametypedefaultdesc
childrenComponentnullTraditional React children component(s) passed along to label the button. Can be text, icon, etc.
colorstringnullAny rgb, hex, hsv, etc. color supported by StyleSheet.
disabledboolfalseDisables the button presses, will call onDisabledOut when pressed anyway (for user experience use cases).
onDisabledOutfuncnullWhen disabled is true, function is called when button is pressed out anyway.
onPressInfuncnullFunction called when button press in.
onPressOutfuncnullFunction called when button is released.

License

Made with 🍊 by Chris Dolphin

license

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago

0.0.2

6 years ago