react-native-bootstrap-buttons

0.0.1 • Public • Published

react-native-bootstrap-buttons

Simple and expandable React Native bootstrap buttons.

Installation

yarn add react-native-bootstrap-buttons

or

npm install react-native-bootstrap-buttons --save

Properties

Prop Name Type Default Value
onPress function null
label string ""
labelStyle Object {}
containerStyle object {}
disabled bool false
buttonType string enum "primary", "outline", "info", "warning", "danger", "success", "link" "primary"
curved bool true
rounded bool false
square bool false

Usage

Curved button ( default )

import Button from "react-native-bootstrap-buttons";
 
<Button label="Curved Button" buttonType="primary" />

Square button

import Button from "react-native-bootstrap-buttons";
 
<Button label="My Button" buttonType="primary" square />

Rounded button

import Button from "react-native-bootstrap-buttons";
 
<Button label="My Button" buttonType="primary" rounded />

Disabled button

import Button from "react-native-bootstrap-buttons";
 
<Button label="My Button" buttonType="primary" disabled />

Add your own themes

call the addTheme function in your app entry file (index.js)

import { addTheme } from "react-native-bootstrap-buttons";
 
//addTheme( themeName, labelColor, disabledLabelColor, backgroundColor, disabledBackgroundColor );
addTheme( "myTheme", "red", "gray", "yellow", "teal" );
 
// Use your custom theme
<Button buttonType="myTheme" label="My Button" />

Demo

To run the demo clone the repo and navigate into the example folder

yarn install
or
npm run

then run yarn run ios or yarn run android

Package Sidebar

Install

npm i react-native-bootstrap-buttons

Weekly Downloads

3

Version

0.0.1

License

MIT

Unpacked Size

49.8 kB

Total Files

10

Last publish

Collaborators

  • shyaniv7