gpdb-widget
TypeScript icon, indicating that this package has built-in type declarations

1.15.0 • Public • Published

gpdb-widget

Try it on demo page

NPM JavaScript Style Guide

Install

npm install --save gpdb-widget

Usage

Read more about application, name owner and user contexts here

import React from 'react'

import { Widget, loadClient } from 'gpdb-widget'

const Example = () => {
  const applicationContext = { instanceSig: 'name-coach.com', typeSig: 'email_dns_name' }
  const nameOwnerContext = { signature: 'jon.snow@name-coach.com', email: 'jon.snow@name-coach.com'  }
  const userContext = { signature: 'jon.snow@name-coach.com' }

  const client = loadClient(
    {
      accessKeyId: process.env.REACT_APP_GPDB_ACCESS_KEY_ID,
      secretAccessKey: process.env.REACT_APP_GPDB_SECRET_ACCESS_KEY
    },
    applicationContext,
    nameOwnerContext,
    userContext
  )

  return <Widget client={client} name="Jon Snow" width={300} />
}

Development

Supported node version is >=12, but currently in CI we use 14.17.1 so this version is preferred

  1. Install dependencies:
       yarn install
  2. Run library in watch mode:
  yarn watch
  1. Run example app to use it in time:
  cd example && yarn install && yarn start

License

MIT © NameCoach

Readme

Keywords

none

Package Sidebar

Install

npm i gpdb-widget

Weekly Downloads

7

Version

1.15.0

License

MIT

Unpacked Size

12.2 MB

Total Files

345

Last publish

Collaborators

  • name-coach-dev