invite-modal
v1.0.6
Published
<p align="center"> <h1 align="center">InvitePeopleModal Component</h1>
Downloads
4
Readme
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
- Install the InvitePeopleModal component.
npm install invite-modal --save
- Import the InvitePeopleModal.
import InvitePeopleModal from "invite-modal";
- Mount the InvitePeopleModal component on the DOM
ReactDOM.render(<InvitePeopleModal />, document.getElementById("root"));
- Run the App
npm start
Setup for running the development version
Open the index.js file & Uncomment the "Development code" part & comment on the "Production Code" part.
Run
npm start
.
Command for running the test cases
npm test -- --coverage
Props of InvitePeopleModal component
| Props | Type | Description | | ------------------- | -------- | ------------------------------------------------------------------------------------------------------ | | triggerElement |htmlelement| Set the element by clicking on which modal will open | | uri | string | Link of the api end-point | | navigate | function | Utility function to change the page/screens | | mobileheader |htmlelement| Header which will be visible on mobile while modal is active | | organizationname | string | Name of organization | | organizationId | string | Id of organization |