contact-join-poc-address

Install
npm install --save contact-join-poc-address
Usage
import React, { useState } from 'react';
import MainPage from 'contact-join-poc-address';
function Example() {
//Prop and function to update it
const [stateText, setStateText] = useState('Test');
//style that will override the default (not mandatory)
const style = {
input: {backgroundColor: 'red', },
label: {marginRight: "10px" },
div: {padding: "10px"}
}
const getLoginUsername = () => {
//code that gets the username from session
const loginUsername = "Andre";
return loginUsername;
}
const goToHomePageHandler = () => {
//code that redirects to home page
console.log("goToHomePage");
}
return (
<MainPage
stateText={stateText}
handleStateTextChange={setText}
style={style}
username={getLoginUsername()}
goToHomePage={goToHomePageHandler} />
);
}
License
MIT ©