0.1.0 • Published 2 years ago

invite-people-modal v0.1.0

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

About

InvitePeopleModal is a react usable component for inviting users to the website.

Invite People modal component interact with the application, but without jumping to a new page and interrupting the user's workflow.

Usage

Dependencies

Install react fontawsome using the following command:

npm i --save @fortawesome/fontawesome-svg-core

npm install --save @fortawesome/free-regular-svg-icons

Setup

  1. Install the InvitePeopleModal component.
npm install hc-nav-bar --save
  1. Import the InvitePeopleModal.
import InvitePeopleModal from "hc-nav-bar";
  1. Mount the InvitePeopleModal component on the DOM
ReactDOM.render(<InvitePeopleModal />, document.getElementById("root"));
  1. Run the App
npm start

Setup for running the development version

  1. Open the index.js file & Uncomment the "Development code" part & comment on the "Production Code" part.

  2. Run npm start.

Command for running the test cases

npm test -- --coverage

Props of InvitePeopleModal component

PropsTypeDescription
triggerElementhtmlelementSet the element by clicking on which modal will open
uristringLink of the api end-point
navigatefunctionUtility function to change the page/screens
mobileheaderhtmlelementHeader which will be visible on mobile while modal is active
organizationnamestringName of organization
organizationIdstringId of organization