Simple and expandable React Native bootstrap buttons.
yarn add react-native-bootstrap-buttons
or
npm install react-native-bootstrap-buttons --save
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 |
import Button from "react-native-bootstrap-buttons";
<Button label="Curved Button" buttonType="primary" />
import Button from "react-native-bootstrap-buttons";
<Button label="My Button" buttonType="primary" square />
import Button from "react-native-bootstrap-buttons";
<Button label="My Button" buttonType="primary" rounded />
import Button from "react-native-bootstrap-buttons";
<Button label="My Button" buttonType="primary" disabled />
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" />
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