JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 33
  • Score
    100M100P100Q47800F
  • License MIT

Button spinner

Package Exports

  • react-native-button-spinner

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-native-button-spinner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

react-native-button-spinner npm version

npm Package Quality MIT Licence

Buttons spinners plugin for react-native

Getting Started

npm i react-native-button-spinner --save

Usage

import ButtonSpinner from 'react-native-button-spinner';
...
// Your button

<ButtonSpinner>
    My text button 1
</ButtonSpinner>
<ButtonSpinner
    disabled={true}
    test={false}
>
    My text button 2
</ButtonSpinner>
<ButtonSpinner
    style={{ backgroundColor: 'blue' }}
    disabled={true}
    opacityDisabled={0.1}
>
    My text button 3
</ButtonSpinner>
<ButtonSpinner
    onPress={this.test1}
>
    My text button 4
</ButtonSpinner>

Props

Parameter Type Required description default
textButton string no Text Button (use textButton or children) 'Button Text'

| children | string | no | Text Button (use textButton or children) | '' | | disabled | boolean | no | Disable button click | false
| opacity | number | no | Default opacity button | 1
| opacityDisabled | number | no | Default opacity button when button disable | 0.35
| pendingRequest | boolean | no | Wait for function to complete | true
| automaticTimeEnable | number | no | Time after which the button becomes active without waiting for the function to complete | 0
| styleButton | object {someKey: someValue} | no | Style for button | { alignItems: 'center', backgroundColor: 'f5f5f5', color: '#dddddd', paddingVertical: 10, paddingHorizontal: 25, margin: 10, borderColor: '#c2c2c2', borderRadius: 5, borderWidth: 1, flex: 1, flexDirection: 'row', justifyContent: 'center',}
| styleText | object {someKey: someValue} | no | Style for button text if you not use custom component in button tag | { color: '#000000'} | styleSpinner | object { style: { {someKey: someValue} }, color: string, size: string } | no | Style for button spinner if not use customSpinnerComponent | { style: { marginRight: 15 }, color: '#a6a6a6', size: 'small', // 'small' or 'large' } | typeSpinner | string defaut | custom | no | Type button spinner loader. Size has this option: 'small' or 'large' | defaut | positionSpinner | string | no | Position button spinner if not use customSpinnerComponent. Position has this option: 'left' 'right' 'centered-over-text' 'centered-without-text' 'left-without-text' 'right-without-text' 'above-text' 'below-text' | left | customSpinnerComponent | React.ReactElement<any> | no | Custom button spinner component | '' | onPress | function

() => any | no | Your function for click | () => {}

License

This project is licensed under the MIT License - see the LICENSE file for details

Copyright (c) 2019 Igor Rosliakov