@cowprotocol/widget-react
TypeScript icon, indicating that this package has built-in type declarations

0.13.0 • Public • Published

CoW Swap React widget

React component that creates a CoW Swap widget. It is based on https://npmjs.com/package/@cowprotocol/widget-lib

Use it

Install dependency

yarn add @cowprotocol/widget-react
npm install @cowprotocol/widget-react

Import component and some convenient types

import { CowSwapWidget, CowSwapWidgetParams } from '@cowprotocol/widget-react'

Prepare the config for the widget:

const cowSwapWidgetParams: CowSwapWidgetParams = {
  appCode: 'NAME-OF-YOU-APP', // Add here the name of your app. e.g. "Pig Swap"
  width: '600px',
  height: '700px',
  tradeType: 'swap',
}

Render the component:

<CowSwapWidget params={cowSwapWidgetParams} />

Developers

# Test
nx test widget-react

# Build the library
nx build widget-react

# Publish to NPM
nx publish widget-react --ver x.y.z --tag latest

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.10.2-RC.00next
0.13.0983latest

Version History

VersionDownloads (Last 7 Days)Published
0.13.0983
0.12.016
0.11.021
0.10.2-RC.00
0.10.1-RC.00
0.10.067
0.9.31
0.9.20
0.9.114
0.9.00
0.8.20
0.8.10
0.8.00
0.7.10
0.7.00
0.7.0-RC.00
0.6.00
0.5.00
0.5.0-RC.40
0.5.0-RC.30
0.5.0-RC.20
0.5.0-RC.10
0.5.0-RC.00
0.4.00
0.3.00
0.2.30
0.2.20
0.2.10
0.2.00
0.1.10
0.1.00
0.0.20
0.0.10

Package Sidebar

Install

npm i @cowprotocol/widget-react

Weekly Downloads

867

Version

0.13.0

License

ISC

Unpacked Size

31.1 kB

Total Files

6

Last publish

Collaborators

  • fairlighteth
  • cowprotocol_dev
  • harisang
  • fedgiac
  • anxolin