0.0.11 • Published 2 years ago
my-library-popup-huehue v0.0.11
my-library-popup-huehue
This repo is the example of react package published
Installation:
npm install my-library-popup-huehueor
yarn add my-library-popup-huehueUsage :
Add MyNiceModal to your component:
import React from 'react'
import ReactDOM from 'react-dom/client'
import { MyNiceModal } from "my-library-popup-huehue";
const root = ReactDOM.createRoot(document.getElementById('root') as HTMLElement)
root.render(
    <React.StrictMode>
        <div>
            <MyNiceModal
              buttonText="Connecto Huehue"
              buttonStyle={{
                border: "1px solid gray",
                padding: "10px",
                borderRadius: "10px",
                color: "black",
              }}
              modalStyle={{
                backgroundColor: "",
                border: "1px solid gray",
                padding: "10px",
                borderRadius: "10px",
                width: "450px",
                height: "700px",
              }}
              sdkKey="your_expected_sdk_key"
              onSuccess={(user) => console.log("Login Success:", user)}
              onExit={() => console.log("Yep The Modal Closed")}
            />
        </div>
    </React.StrictMode>,
)