New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-pricing-table

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-pricing-table

Fast, flexible, simple pricing tables in React

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
68
-31.31%
Maintainers
1
Weekly downloads
 
Created
Source

React Pricing Table

Fast, flexible, simple pricing tables in React.
Built with ❤︎ by Gergely Nagy and contributors.


Table of Content

Status

Pre-alpha and under heavy development, do not use!

Features

  • :iphone: Responsive: Made mobile responsive with Flexbox
  • :white_check_mark: Test: Adding tests.
  • Website:

Installation

The package can be installed via NPM:

npm install react-pricing-table --save

You’ll need to install React separately since those dependencies aren’t included in the package. Below is a simple example on how to use the PricingTable in a React view.

import React from 'react';
import {PricingTable, PricingSlot, PricingDetail} from 'react-pricing-table';

class Example extends React.Component {

  render() {
    return  <PricingTable  highlightColor='#f44336'> ... </PricingTable>
  }
}

Configuration

The basic use of the PricingTable can be described with:

<PricingTable  highlightColor='#1976D2'>
    <PricingSlot  onClick={this.submit} buttonText='TRY IT FREE' title='FREE' priceText='$0/month'>
        <PricingDetail> <b>15</b> projects</PricingDetail>
        <PricingDetail> <b>5 GB</b> storage</PricingDetail>
        <PricingDetail> <b>5</b> users</PricingDetail>
        <PricingDetail strikethrough> <b>Time tracking</b></PricingDetail>
    </PricingSlot>
    <PricingSlot highlighted onClick={this.submit} buttonText='SIGN UP' title='BASIC' priceText='$24/month'>
        <PricingDetail> <b>35</b> projects</PricingDetail>
        <PricingDetail> <b>15 GB</b> storage</PricingDetail>
        <PricingDetail> <b>Unlimited</b> users</PricingDetail>
        <PricingDetail> <b>Time tracking</b></PricingDetail>
    </PricingSlot>
    <PricingSlot  onClick={this.submit} buttonText='SIGN UP' title='PROFESSIONAL' priceText='$99/month'>
        <PricingDetail> <b>100</b> projects</PricingDetail>
        <PricingDetail> <b>30 GB</b> storage</PricingDetail>
        <PricingDetail> <b>Unlimited</b> users</PricingDetail>
        <PricingDetail> <b>Time tracking</b></PricingDetail>
    </PricingSlot>
    <PricingSlot  onClick={this.submit} buttonText='SIGN UP' title='ENTERPRISE' priceText='$200/month'>
        <PricingDetail> <b>Unlimited</b> projects</PricingDetail>
        <PricingDetail> <b>75 GB</b> storage</PricingDetail>
        <PricingDetail> <b>Unlimited</b> users</PricingDetail>
        <PricingDetail> <b>Time tracking</b></PricingDetail>
    </PricingSlot>
</PricingTable>

Result: react-pricing-table

Compatibility

React

We're always trying to stay compatible with the latest version of React. We can't support all older versions of React, since React is still < 1.0 and introducing breaking changes every release.

Browser Support

The react pricing table is compatible with the latest versions of Chrome, Firefox, and IE11+.

Unfortunately it is difficult to support legacy browsers while maintaining our ability to develop new features in the future. For IE9 support, it is known that the classlist polyfill is needed, but this may change or break at any point in the future.

Local Development

The master branch contains the latest version of the PricingTable component. To start your example app, you can run yarn start. This starts a simple webserver on http://localhost:8080.

You can run yarn test to execute the test suite and linters. To help you develop the component we’ve set up some tests that covers the basic functionality. Even though we’re big fans of testing, this only covers a small piece of the component. We highly recommend you add tests when you’re adding new functionality.

The examples

The examples are hosted within the docs folder and are ran in the simple add that loads the PricingTable. To extend the examples with a new example, you can simply duplicate one of the existing examples and change the unique properties of your example.

API

PricingTable props:

nametypedefaultdescription
highlightColorstring#f44336Color of the highlighted slot and buttons.

PricingSlot props:

nametypedefaultdescription
onClickfunctionFunction to be called when the button is clicked.
titlestringTitle of this slot.
priceTextstringLabel for the price.
buttonClassstringbutton-submitCustom styles for the Button.
buttonTextstringLabel for the Button.
highlightedbooleanfalseWhether to show highlighted header.

PricingDetail props:

nametypedefaultdescription
strikethroughbooleanfalseWhether to show strikethrough text decoration.

License

Copyright (c) 2017 Gergely Nagy and individual contributors. Licensed under MIT license, see LICENSE for the full license.

Keywords

react-component

FAQs

Package last updated on 04 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts