0.5.4 • Published 3 years ago

digicard-react-native-material-buttons v0.5.4

Weekly downloads
-
License
BSD-3-Clause
Repository
github
Last release
3 years ago

react-native-material-buttons

npm license

Material buttons with consistent behaviour on iOS and Android

example

Installation

npm install --save react-native-material-buttons

Usage

import React, { Component } from 'react';
import { TextButton, RaisedTextButton } from 'react-native-material-buttons';

class Example extends Component {
  render() {
    return (
      <RaisedTextButton title='touch me' />
      <TextButton title='do not touch me' disabled />
    );
  }
}

Common properties

namedescriptiontypedefault
colorButton colorStringrgb(224, 224, 224)
shadeColorButton shade color for focused stateStringrgb(0, 0, 0)
shadeOpacityButton shade opacity for focused stateNumber0.12
shadeBorderRadiusButton shade border radiusNumber2
focusAnimationDurationButton focus animation duration in msNumber225
disabledButton availabilityBooleanfalse
disabledColorButton color for disabled stateStringrgba(0, 0, 0, .12)
onPressTouch up callbackFunction-

Other Ripple properties will also work

TextButton properties

namedescriptiontypedefault
titleButton titleString-
titleColorButton title colorStringrgb(0, 0, 0)
disabledTitleColorButton title color for disabled stateStringrgb(153, 153, 153)
titleStyleButton title styleObject-

RaisedTextButton properties

namedescriptiontypedefault
titleButton titleString-
titleColorButton title colorStringrgb(66, 66, 66)
disabledTitleColorButton title color for disabled stateStringrgba(0, 0, 0, .26)
titleStyleButton title styleObject-

Example

git clone https://github.com/n4kz/react-native-material-buttons
cd react-native-material-buttons/example
npm install
npm run ios # or npm run android

Copyright and License

BSD License

Copyright 2017 Alexander Nazarov. All rights reserved.