0.2.0 • Published 2 years ago

react-native-category-card v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
2 years ago

Demo

Installation

Add the dependency:

npm i react-native-category-card

Peer Dependencies

IMPORTANT! You need install them
"react-native-androw": ">= 0.0.34",
"react-native-linear-gradient": ">= 2.5.6",
"@freakycoder/react-native-bounceable": ">= 0.1.1"

Usage

Import

import CategoryCard from "react-native-category-card";

CategoryCard Usage

<CategoryCard onPress={() => console.log("Fruits")} />
<CategoryCard
  titleText={"Meat & Poultry"}
  descriptionText={"Butcher"}
  count={1}
  disableRightButton
  titleColor="#E8B730"
  descriptionColor="#edd695"
  onPress={() => console.log("Meat & Poultry")}
/>
<CategoryCard
  titleText={"Pantry"}
  descriptionText="Fresh Food"
  disableRightButton
  count={8}
  gradientColors={["#E5D1FA", "#C69CF4", "#A866EE"]}
  imageSource={require("./lib/asset/star.png")}
  onPress={() => console.log("Pantry")}
/>

Configuration - Props

PropertyTypeDefaultDescription
shadowStylestyledefaultchange the shadowStyle
shadowColorstring'#757575'change the shadowColor
heightnumberchange the containers height
widthnumberScreenWidth * 0.8change the the containers width
borderRadiusnumber16change the the containers borderRadius
backgroundColorstring'#fff'change the containers backgroundColor
gradientColorsarray'#9CF4DF', '#30C9E8', '#107C91'change the Linear Gradient Colors
imageStylestyledefaultchange the left image style
imageSourceassetdefaultchange the image source
customImageComponentcomponentdefaultset your own custom component instead of default Image one
titleTextstyledefaultchange the title text
titleColorstring"#4B4B4B"change the title text color
customTitleTextComponentcomponentdefaultset your own custom component instead of default Text one
descriptionTextstringchange the description text
descriptionColorstring"#B4B4B4"change the description text color
customDescriptionComponentcomponentdefaultset your own custom component instead of default Text one
countnumber10change the count
customCountTextComponentcomponentdefaultset your own custom component instead of default Text one
onPressfunction()set your own function when onPress
rightButtonImageSourceassetdefaultchange the right button image source
buttonImageStylestyledefaultchange the button image style
disableRightButtonbooleantruedisable the right button

Future Plans

  • LICENSE

Change Log

Change log will be here !

Author

Sevval Eygul, sevvalleygull@gmail.com

License

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