npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-floating-whatsapp2

v1.0.3

Published

Simple React Component for adding a floating WhatsApp button to your project. with some additional functionality

Downloads

17

Readme

React Floating Whatsapp2

Simple react component for adding a floating WhatsApp button to your project.

NPM npm bundle size GitHub

Install

npm

npm i react-floating-whatsapp2

Yarn

yarn add react-floating-whatsapp2

Usage

import React from 'react'
import { FloatingWhatsApp } from 'react-floating-whatsapp2'

export default function App() {

  return (
      <FloatingWhatsApp {/*  Props  */} />
  )
}

Props

| Prop | Type | Options | Description | Default | | ----------------------- | :-----------: | -------- | ------------------------------------------------------------------------------------------------------------------------- | :----------------------------------: | | phoneNumber | String | Required | Phone number in intenational format | 1234567890 | | accountName | String | Required | Account username | Account Name | | onClick | Function | Optional | Callback function fires on click | - | | onSubmit | Function | Optional | Callback function fires on submit with event and form input value passed | - | | onClose | Function | Optional | Callback function fires on close | - | | onLoopDone | Function | Optional | Callback function called when notification loop done | - | | onNotification | Function | Optional | Callback function fired when notification runs | - | | avatar | String | Optional | Change user avatar using static assets | UI Face | | statusMessage | String | Optional | Text below the account username | Typically replies within 1 hour | | chatMessage | String | Optional | Text inside the chat box. | Hello there! 🤝 \nHow can we help? | | placeholder | String | Optional | Input placeholder. | Type a message.. | | messageDelay | Number | Optional | Time delay after which the chatMessage is displayed (in seconds). | 2 | | darkMode | Boolean | Optional | Dark style. | false | | openChatOnClick | Boolean | Optional | open the chat box if clicked on whatsApp icon | true | | allowDefaultSubmit | Boolean | Optional | Allow default submit behavior of redirecting to whatsApp on submit | true | | allowClickAway | Boolean | Optional | Closes the chat box when user clicks outside | false | | allowEsc | Boolean | Optional | Closes the chat box when Escape key is pressed | false | | className | String | Optional | CSS className applied to the main wrapping Div | floating-whatsapp | | buttonClassName | String | Optional | CSS className applied to button | floating-whatsapp-button | | style | CSSProperties | Optional | Inline style applied to the main wrapping Div | {} | | buttonStyle | CSSProperties | Optional | Inline style applied to button | {} | | chatboxHeight | Number | Optional | Control chat box height | 320 | | chatboxClassName | String | Optional | CSS className applied to chat box | floating-whatsapp-chatbox | | chatboxStyle | CSSProperties | Optional | Inline style applied to chat box | {} | | notification | Boolean | Optional | Allow notifications (Disabled after user open the chat box) | false | | notificationDelay | Number | Optional | Time delay between notifications in seconds | 60 | | notificationSound | Boolean | Optional | Allow notification sound | false | | notificationSoundSrc | String | Optional | Notification sound custom src | - | | notificationLoop | Number | Optional | Repeat notifications loop | 0 | | notificationStyle | CSSProperties | Optional | Inline style applied to notification | - | | notificationClassName | String | Optional | CSS className applied to notification indicator | floating-whatsapp-notification |

Edit react-floating-whatsapp2

Credits

awran5

i forked this project because owner is inactive from last many months also need some extra functionality and more stability

License

MIT © AdarshHatkar