0.0.16 • Published 6 years ago

@paraboly/react-native-card-button v0.0.16

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

Fully customizable Card Button via Paraboly for React Native.

npm version npm Platform - Android and iOS License: MIT styled with prettier

Installation

Add the dependency:

npm i @paraboly/react-native-card-button

Peer Dependencies

IMPORTANT! You need install them.
"react": ">= 16.x",
"react-native": ">= 0.55.x",
"react-native-vector-icons": ">= 6.x.x",
"react-native-linear-gradient": ">= 0.2.x",
"react-native-material-ripple": ">= 0.8.x",
"react-native-dynamic-vector-icons": ">= x.x.x"

Basic Usage

<CardButton text="Home" />

Solid Background (Non Gradient) Usage

<CardButton gradient={false} backgroundColor="#049134" />

Advanced Usage

<CardButton
	width={75}
	height={75}
	textSize={10}
	key={layer.id}
	text={layer.title}
	iconColor={"white"}
	textColor={"white"}
	gradient={layer.active}
	gradientColor={["#48c6", "#2f3a60"]}
	onPress={_.partial(this.toggle, item).bind(this)}
	iconComponent={
	<View style={sharedStyle.center}>
	  <MyIcon
	  	size={50}
	  	name={'map' }
	  	color={"white"}/>
	</View>
	}
/>

Configuration - Props

PropertyTypeDefaultDescription
gradientbooleantrueif you do not want to use card button with gradient color, simply make it false
widthnumber90change the card button's width
heightnumber90change the card button's height
startobject{ x: 0, y: 1 }change the gradient's start way
endobject{ x: 0, y: 1 }change the gradient's end way
textstringTestuse this to set card button's below text
gradientColorscolor array"#f9f7b4", "#f7c77e", "#e8ba6b"use this to set your own gradient colors
modalBottomnumberheight * 0.6use this to change where modal will be appear depends on the bottom
borderRadiusnumber20change the border radius
iconNamestringtrafficchange the icon itself
iconSizenumber36change the icon's size
iconTypestringMaterialIconschange the icon's type
iconColorcolor"#cdcfd6"change the icon's color
rippleColorcolor"#678fee"change the ripple color
fontFamilyfont familydefaultuse this to set your own font family
backgroundColorcolor"#fcfcfc"change the background color if you want to use solid color
rippleContainerBorderRadiusnumber20change the ripple's border radius

Author

FreakyCoder, kuray.ogun@paraboly.com || kurayogun@gmail.com

License

React Native Card Button Library is available under the MIT license. See the LICENSE file for more info.