1.0.2 • Published 2 years ago

swallet-sdk v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

solo-wallet-sdk

Installation

To install, you can use npm or yarn:

$ npm install --save swallet-sdk
$ yarn add swallet-sdk

Examples

Here is a simple example of swallet-sdk being used in an app with some custom styles and focusable input elements within the modal content:

import React from 'react';
import ReactDOM from 'react-dom';
import SingleMessage from 'swallet-sdk';

function App() {
  let subtitle;
  const [modalIsOpen, setIsOpen] = React.useState(false);

  function openModal() {
    setIsOpen(true);
  }

  function afterOpenModal() {
    // references are now sync'd and can be accessed.
    subtitle.style.color = '#f00';
  }

  function closeModal() {
    setIsOpen(false);
  }

  return (
    <div>
      <SingleMessage 
            platformName="decentraland"
            refURL="https://google.com.pk"
            platformPic="https://s3-symbol-logo.tradingview.com/alphabet--600.png" 
            resourcePath="https://d2pq1t192wxkwf.cloudfront.net/0x855cb1d65cf85ecfd23521308eee34bd3876b046/bogus/d87e749f-434c-4eb0-99f7-c0bf974bbd00"
            style={{width: "300px"}}
            privileged="true"
       />
    </div>
  );
}

ReactDOM.render(<App />, appElement);