1.0.4 • Published 2 years ago

pricing-paper v1.0.4

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

⌗ pricing-paper

A react pricing component to easily integrate in your application. ✨

npm version

code style: prettier

Features

  • Create pricing page in 10 line of code 🥳
  • Lightweight ⚡
  • Easy to use 🐥
  • fully customizable style ⚒️

Install

Via package managers:

npm i pricing-paper

Example Usage

import Pricing from 'pricing-paper'

const firstPlan = {
  'title': 'Demo 1',
  'price': 'FREE'
}
const popularPlan = {
  'title': 'Demo 2',
  'price': '$54'
}

const lastPlan = {
  'title': 'Demo 3',
  'price': '$99'
}

const firstFeatures = [
  {
    'name': 'First Features',
    'applicable': true
  },
  {
    'name': 'First Features',
    'applicable': true
  },
  {
    'name': 'First Features',
    'applicable': false
  },
  {
    'name': 'First Features',
    'applicable': true
  },
  {
    'name': 'First Features',
    'applicable': false
  },


]

const popularFeatures = [
  {
    'name': 'Popular Features',
    'applicable': true
  },
  {
    'name': 'Popular Features',
    'applicable': true
  },
  {
    'name': 'Popular Features',
    'applicable': true
  },
  {
    'name': 'Popular Features',
    'applicable': true
  },
  {
    'name': 'Popular Features',
    'applicable': true
  },


]

const lastFeatures = [
  {
    'name': 'Last Features',
    'applicable': true
  },
  {
    'name': 'Last Features',
    'applicable': true
  },
  {
    'name': 'Last Features',
    'applicable': true
  },
  {
    'name': 'Last Features',
    'applicable': true
  },
  {
    'name': 'last Features',
    'applicable': true
  },


]

const styles = {
  'planCard': {
    backgroundColor: '#ffebb3'

  },
  'planHeroCard': {

  },
  'planCardTitle': {

  },
  'planCardPrice': {

  },
  'planButton': {

  },
  'badge': {
    
  }
}

const alertMe = () => {
  alert("Hi")
}

 <Pricing firstPlan={firstPlan}
      popularPlan={popularPlan}
      lastPlan={lastPlan}
      firstFeatures={firstFeatures}
      popularFeatures={popularFeatures}
      lastFeatures={lastFeatures}
      styles={styles}  
      buttonValue={"Buy Now"}
      handleClick={alertMe}
  />

Props

PropTypeRequirementDescription
firstPlanobjectrequiredobject of name and price
popularPlanobjectrequiredobject of name and price
lastPlanobjectrequiredobject of name and price
firstFeaturesArrayrequiredArray of Features
popularFeaturesArrayrequiredArray of Features
lastFeaturesArrayrequiredArray of Features
stylesobjectoptionalobject of React style
buttonValuestringrequiredButton Text
handleClickfunctionoptionalButton click event
buttonDisabledbooleanoptionaltrue or false

Contributing

Feel free to submit any issues or pull request 🙂