0.0.1 • Published 5 years ago

@paraboly/react-native-button-card-view v0.0.1

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

Battle Tested ✅

Map based list card view for React Native via Paraboly.

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

Installation

Add the dependency:

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

Peer Dependencies

IMPORTANT! You need install them
"react": ">= 16.x.x",
"react-native": ">= 0.55.x",
"react-native-androw": ">= 0.0.34",
"react-native-user-avatar": ">= 1.0.4",
"@freakycoder/react-native-helpers": "^0.1.0"

Usage

Import

import ButtonCardView from "@paraboly/react-native-button-card-view";

Usage (IMPORTANT! READ IT BEFORE USE)

To fill the list data. You HAVE TO use this format:

Updated: "source" is optional now :)

[
  {
    "name": "Azamat Zhanisov",
    "source": "https://images.unsplash.com/photo-1566807810030-3eaa60f3e670?ixlib=rb-1.2.1&auto=format&fit=crop&w=3334&q=80"
  },
  {
    "name": "Ayo Ogunseinde",
    "source": "https://images.unsplash.com/photo-1529626455594-4ff0802cfb7e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=3000&q=80"
  }
]
<ButtonCardView
  data={dummyData}
  title="Hello"
  colors={["red", "black", "gray"]}
  primaryButtonText="Haritaya Git"
  secondaryButtonText="Yol Tarifi"
  primaryImage={require("example/assets/Map.png")}
  secondaryImage={require("example/assets/Route.png")}
  onPressPrimary={() => console.log("primary button")}
  onPressSeconday={() => console.log("secondary button")}
/>

Configuration - Props

PropertyTypeDefaultDescription
widthnumber, stringScreenWidth * 0.9change the width of the card view
heightnumber, string150change the height of the card view
titlestringTestimonialchange the title
dataarraydummyData(check the code)set your own data array however you HAVE TO fill the array with above format!
stylesstyledefaultchange the container's style
titleStylestyledefaultchange the title's style
shadowStylestyledefaultchange the shadow's style
shadowColorstring#cccchange the shadow color
borderColorstring#f54242change the border color
backgroundColorstring#fffchange the background color
borderLeftWidthnumber5change the left sided border width
colorsarraycolorschange the background color of text avatar
sizestring"30"change the size of avatar(image)'s size
listHeightnumber, string85change list height
primaryButtonTextstringchange the button names
primaryImageimagedefaultchange image in button
buttonContainerStylesstyledefaultchange the button container style
buttonStylesstyledefaultchange the button style

Future Plans

  • LICENSE

Author

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

License

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