1.4.1 • Published 3 months ago

plurality-repconnect-widget v1.4.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

Plurality Reputation Connect Widget

This repo contains the functionality to load the plurality identity oracle as a popup widget.

To run

npm install && npm run start

To use it in a react project

Here is a basic demo how it can be used in any react project

import PluralityPopupWidget from 'plurality-repconnect-widget';

const App = () => {
    // Handle the data returned from the widget
    const handleDataReturned = (data) => {
        console.log('Received data from widget:', data);
        // Handle the received data in the external webpage
        // ... (perform actions with the received data)
        // Call connectWallet to ensure the user is connected to the dapp
        connectWallet();
    };

    return (
        <div>
            <PluralityPopupWidget
                options={{ apps: 'facebook,twitter' }}
                onDataReturned={handleDataReturned}
                // all customization params are optional
                // customization={{ height: '200px', width: '500px', initialBackgroundColor: '#E8A123', initialTextColor: '#FFFFFF', flipBackgroundColor: '#12AE83', flipTextColor: '#FFFFFF'}}
            />
        </div>
    );
};

To publish new version on npm registry

  • Update the version in package.json file
  • Run npm run webpack and verify the ./lib/PluralityPopupWidget.js file if it is updated
  • Run npm version and verify if the version is updated correctly locally
  • Run npm publish to publish it to public npm registry

Customizable attributes

  • height: Specify the height of the button
  • width: Specify the width of the button
  • initialBackgroundColor: Specify the intial background color of the button
  • initialTextColor: Specify the intial text color of the button
  • flipBackgroundColor: Specify the flipped background color of the button
  • flipTextColor: Specify the flipped text color of the button

Release

  • The package is released on NPM registry via a build pipeline on merge to main
1.4.1

3 months ago

1.4.0

4 months ago

1.3.0

4 months ago

1.2.7

4 months ago

1.2.6

4 months ago

1.2.5

4 months ago

1.2.4

4 months ago

1.2.3

4 months ago

1.2.0

4 months ago

1.2.1

4 months ago

1.1.1

5 months ago

1.1.0

5 months ago

0.1.6

5 months ago

0.1.5

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago