npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dodoex-web-component

v0.1.1

Published

A semi full-featured dodo app widget as a web component so everybody could easily add it to their project no matter their environment. It could be react, vue, angular or simple HTML.

Downloads

11

Readme

Introduction

dodoex-web-component is a lightweight widget for trading on dodoex. This widget is a web component which is basically and html tag. If you have ever used a <video /> or <audio/> you already know what is a web component. You need to import the script and when you want to use the widget just put <dodoex-widget /> tag.

Demo

Image

Getting Start

Step 1

First you need to somehow define a Web3 global variable or into Window.Web3 . This is because if a project already has a Web3 in it we don't need to download another 1.5mgb of code and it makes loading the site faster. If you already don't have web3 in your project you just need to add a web3 cdn in your main html page

    <script src="https://cdnjs.cloudflare.com/ajax/libs/web3/3.0.0-rc.5/web3.min.js"
    integrity="sha512-jRzb6jM5wynT5UHyMW2+SD+yLsYPEU5uftImpzOcVTdu1J7VsynVmiuFTsitsoL5PJVQi+OtWbrpWq/I+kkF4Q=="
    crossorigin="anonymous" referrerpolicy="no-referrer">
    </script>

Step 2

Installing the component or importing it from a CDN

    npm install --save dodoex-web-component

And import it

    import 'dodoex-web-component';

Or add this to main html page

    <script src="https://unpkg.com/[email protected]/dodex-widget.bundled.js" crossorigin="anonymous"
    type="module"   referrerpolicy="no-referrer">
  </script>

Step 3

You need to define the css variables that widget will use. Copy this in your css file and customize it if you want.

    html {
            --dodoBackground: #1A1A1B;
            --dodoSecondaryBackground: #373739;
            --dodoHelperBackground: rgb(35, 35, 36);
            --dodoHelperLightBackground: rgb(65, 65, 67);
            --dodoModalOverlay: rgb(0, 0, 0, 0.8);
            --dodoPrimary: #ffe804;
            --dodoPrimaryDark: rgb(64, 62, 37);
            --dodoText: #f4f4f4;
            --dodoSecondaryText: rgb(133, 133, 141);
            --dodoFontFamily: "Poppins", "Inter", PingFangSC-Regular, "Microsoft YaHei", sans-serif;
            --font-family-sans-serif: -apple-system,    BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"
        }

Step 4

Add dodoex widget to wherever you want like this. As you see currently you have two default option configuration. If you don't choose them by default it would be ETH for defaultpay and USDC for defaultreceive.

    <div id="widget-container">
        <dodoex-widget
            defaultpay="USDC" 
            defaultreceive="ETH" 
        />
    </div>

Step 5

dodoex widget will fill its container. So you need to style the container as you wish. For example:

    #widget-container {
        width: 400px;
        border-radius: 1em;
        overflow: hidden;
    }

Features

  • [x] Just DODO it loading
  • [x] Ethereum Network Support
  • [x] Binance Network Support
  • [x] HECO Network Support
  • [ ] Kovan Network Support - It actually currently supported but route API can not find any route
  • [ ] Poloygon Network Support - It actually currently supported it but the price api is not reliable
  • [x] Reload and auto reload price
  • [x] Slippage tolerance setting
  • [x] Deadline setting
  • [x] Gas price setting
  • [x] Swap
  • [x] Sreach Token
  • [ ] Token Tabs
  • [x] Connection Modal
  • [x] Manage Modal
  • [ ] Wallet Connect Support
  • [ ] Portis Support
  • [ ] Share Market Support
  • [ ] More customization
  • [ ] More initial control