@human.tech/passport-embed
v0.3.4
Published
Human Passport Embeddable Widgets
Readme
passport-embed
Installation
yarn add @human.tech/passport-embedUsage
See the dev server for example advanced usage, although generally the following will suffice:
import React from 'react';
import { PassportScoreWidget } from '@human.tech/passport-embed';
const App = () => {
return (
{/* ... */}
<PassportScoreWidget
apiKey="API_KEY"
address="0x..."
scorerId="5"
collapseMode="overlay" /* or "shift" or "off" */
connectWalletCallback={/* your app's connect button callback */}
generateSignatureCallback={/* your app's wallet signature callback */}
/>
{/* ... */}
);
};Theme
Accepts a theme prop which can be used to customize the widget's appearance.
See PassportWidgetTheme. Colors are in R, G, B format.
Development
# Install dependencies
yarn setup
# Start the development server
yarn dev:mock