0.0.1 • Published 6 years ago

react-native-bootstrap-buttons v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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 NameTypeDefault Value
onPressfunctionnull
labelstring""
labelStyleObject{}
containerStyleobject{}
disabledboolfalse
buttonTypestring enum "primary", "outline", "info", "warning", "danger", "success", "link""primary"
curvedbooltrue
roundedboolfalse
squareboolfalse

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