0.1.46 • Published 1 year ago

@usewinter/checkout v0.1.46

Weekly downloads
-
License
-
Repository
github
Last release
1 year ago

@usewinter/checkout

:rocket::rocket: React package to integrate Winter checkout :rocket::rocket:

Installation

npm i @usewinter/checkout

OR

yarn add @usewinter/checkout

Usage in your react app

import { WinterCheckout } from '@usewinter/checkout';

<WinterCheckout
    projectId={YOUR_PROJECT_ID}
    production={false}
    showModal={showWinter}
    // testnet need when production is false
    testnet={'goerli' or 'rinkeby'}
    // pass in a function to be called when a successful purchase happens
    onSuccess={() => setParty(true)}
    // pass in a function to be called when the modal is closed
    onClose={() => setShowWinter(false)}
    // Extra mint params are params besides 'address, amount, proof'
    // The key needs to exactly match the name of the param provided to Winter
    // The value will be passed in as the param
    extraMintParams={{tier: 'diamond', type: 'super-rare'}}
    // Price function params
    // The key needs to exactly match the name of the param provided to Winter
    // The value will be passed in as the param
    priceFunctionParams={{tier: 'gold', type: 'rare'}}
    // If you want to customize the css of the checkout widget
    appearance={
        leftBackgroundColor: "#131317",
	      rightBackgroundColor: "#22222d",
	      buttonTextColor: "black",
	      buttonColor: "#f59e0c",
	      primaryTextColor: "white",
	      secondaryTextColor: "#85868a",
	      fontFamily: "Montserrat,sans-serif",
	      buttonAndInputBoxShadow: "0 3px 6px 1px rgba(217, 119, 6, 0.2)",
	      buttonAndInputFocusBoxShadow: "0 3px 6px 1px rgba(217, 119, 6, 0.8)",
        quantityButtonPlusMinusSvgFilter: "invert(100%) sepia(100%) saturate(1%) hue-rotate(135deg) brightness(105%) contrast(101%)",
        inputBackgroundColor: "#131317",
        mintingClipLoaderColor: "white",
        borderColor: "rgba(245,158,11)"
    }
/>

Params:

YOUR PROJECT ID

Get this from the Winter team :)

PRODUCTION

false if you're testing in sandbox, true when you go live!

showModal

this toggles true / false based on the state of your "Pay with Card" button

How to deploy

npm run build
npm version patch 
npm publish 
0.1.42

1 year ago

0.1.43

1 year ago

0.1.44

1 year ago

0.1.45

1 year ago

0.1.46

1 year ago

0.1.30

2 years ago

0.1.31

2 years ago

0.1.32

2 years ago

0.1.33

2 years ago

0.1.34

2 years ago

0.1.35

1 year ago

0.1.36

1 year ago

0.1.37

1 year ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.41

1 year ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.40

1 year ago

0.1.38

1 year ago

0.1.39

1 year ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.12

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.8

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago