Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dexhunterio/swaps

Package Overview
Dependencies
Maintainers
3
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dexhunterio/swaps

## How to development - Update your code in `/src/main.tsx` - Run the demo by editing the code in `src/App.tsx` - Build the library to test with the command: ```console npm run build ``` Your library will be located in `/dist` - To test li

  • 0.0.12
  • npm
  • Socket score

Version published
Weekly downloads
1K
decreased by-33.53%
Maintainers
3
Weekly downloads
 
Created
Source

Dex Hunter - Swap Component

How to development

  • Update your code in /src/main.tsx
  • Run the demo by editing the code in src/App.tsx
  • Build the library to test with the command:
    npm run build
    
    Your library will be located in /dist
  • To test library, let update code in src/App.tsx
    - import Swap from "./app/main";
    + import Swap from '../dist/main'
    + import '../dist/assets/style.css'
    

How to publish library

  • Update version patch:
    npm version patch
    
  • Publish to npm:
    npm publish
    

How to use library

  • Install package:
    npm i @hungnm192/swap-test
    
  • Import to your code:
    import Swap from '@hungnm192/swap-test'
    import '@hungnm192/swap-test/dist/assets/style.css'
    ...
    
  • Use Swap Component:
    function App() {
        const [isOpenWallet, setIsOpenWallet] = useState(false)
        return <div>
          <Swap openWallet={isOpenWallet} onOpenWallet={(open) => setIsOpenWallet(open)} />
          <button onClick={() => setIsOpenWallet(true)} className="text-white">OpenWallet</button>
        </div>;
    }
    

FAQs

Package last updated on 21 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc