rn-loading-button
v1.0.9
Published
Customizable button with loader
Downloads
4
Maintainers
Readme
React Native Loading Button
A customizable button for react-native with loader option(s) which works on Android and iOS.
Installation
Run npm i --save rn-loading-button
Usage
Import
import LoadingButton from "rn-loading-button";
Code
<LoadingButton
containerStyle={{}}
isImage={false}
label={"Button"}
loading={false}
mode={"solid"}
onPress={() => {}}
renderImage={() => {}}
textStyle={{}}
touchable={false}
/>
Properties
| Property | Type | Default Value | Description |
| -------------- | -------- | ------------- | -------------------------------------------------------------------------------- |
| containerStyle | Object | {} | Customizable style property for button container |
| isImage | Boolean | false | Property for showing icon or image inside the button |
| label | String | "Button" | Property for labeling the button |
| loading | Boolean | false | Property for showing loader inside the button |
| mode | String | "solid" | Property for showing different button modes (light, outlined and solid) |
| onPress | Function | ()=>{} | Property for triggering an action once the button is pressed |
| renderImage | Function | ()=>{} | Property for rendering an icon or an image inside the button if isImage={true}
|
| textStyle | Object | {} | Customizable style property for button text |
| touchable | Boolean | false | Property for enabling touchable to the button |
License
ISC