0.0.0 • Published 3 years ago

kuikpay v0.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Kuikpay

NPM JavaScript Style Guide

Install

npm install --save kuikpay

Usage

Props

Prop nameTypeDescriptionDefault value
addToCartfunctionhttps://img.shields.io/badge/-Mandatory-red Function that adds a product to your cartundefined
itemToAddItemProduct to be added to your cartundefined
updateItemsfunctionhttps://img.shields.io/badge/-Mandatory-red Function that removes products from your cartundefined
orderFormOrderFormhttps://img.shields.io/badge/-Mandatory-red Information to make the orderundefined
updateOrderFormProfilefunctionhttps://img.shields.io/badge/-Mandatory-red Function to update the user in your cartundefined
cartSimulationfunctionhttps://img.shields.io/badge/-Mandatory-red Function to make the cart simulations in your storeundefined
clearDatafunctionhttps://img.shields.io/badge/-Mandatory-red Function to reset your store information after making the orderundefined
languagestringLanguage in which the messages will be displayedundefined
isVisiblebooleanOption to hide the button according to your needs, for example if a product has no inventorytrue

OrderForm Type

PropertyTypeDescription
clientProfileDataClientProfileDataClient information
itemsItem[]Items added to cart
totalizersTotalizer[]Totals
valuenumberAmount to be paid

ClientProfileData Type

PropertyTypeDescription
emailstringClient email

Item Type

PropertyTypeDescription
idnumberSKU ID
quantitynumberQuantity to add
sellerstringSeller ID

Totalizer Type

PropertyTypeDescription
idstringTotalizer ID. Options Items, Shipping, Tax
namestringTotalizer name
valuenumberValue
import React, { Component } from 'react'

import { Kuikpay } from 'kuikpay'
import 'kuikpay/dist/index.css'

class Example extends Component {
  render() {
    return <Kuikpay {...props} />
  }
}

Development

Execute

npm install
npm run start

Execute in another terminal

cd example
npm i
npm run start

Then in the browse, replace localhost for http://vtexlatam.vtexlocal.com.br/

License

MIT ©