Skip to content

Commit

Permalink
feat(new props): add: new props
Browse files Browse the repository at this point in the history
  • Loading branch information
awran5 committed Aug 20, 2021
1 parent 8f978c0 commit 9843949
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,21 @@ export default function App() {

### Props

| Prop | Type | Options | Description | Default |
| --------------- | :-----------: | -------- | ------------------------------------------------------------------------------------------------------------------------- | :----------------------------------: |
| `phoneNumber` | String | Required | Phone number in [intenational format](https://faq.whatsapp.com/general/contacts/how-to-add-an-international-phone-number) | `1234567890` |
| `accountName` | String | Required | Account username | `Account Name` |
| `avatar` | String | Optional | change user avatar using [static assets](https://create-react-app.dev/docs/adding-images-fonts-and-files/) | `-` |
| `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?` |
| `darkMode` | boolean | Optional | Dark style. `true` if present | false |
| `styles` | CSSProperties | Optional | Inline style applied to the `Button` only | `-` |
| `className` | className | Optional | CSS className applied to the main `Div` | `-` |
| Prop | Type | Options | Description | Default |
| ---------------- | :-----------: | -------- | ------------------------------------------------------------------------------------------------------------------------- | :----------------------------------: |
| `phoneNumber` | String | Required | Phone number in [intenational format](https://faq.whatsapp.com/general/contacts/how-to-add-an-international-phone-number) | `1234567890` |
| `accountName` | String | Required | Account username | `Account Name` |
| `avatar` | String | Optional | change user avatar using [static assets](https://create-react-app.dev/docs/adding-images-fonts-and-files/) | `-` |
| `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..` |
| `darkMode` | boolean | Optional | Dark style. | false |
| `allowClickAway` | boolean | Optional | Closes the chat box when user click outside | false |
| `allowEsc` | boolean | Optional | Closes the chat box when escape key is pressed | false |
| `styles` | CSSProperties | Optional | Inline style applied to the `Button` only | `-` |
| `className` | className | Optional | CSS className applied to the main `Div` | `-` |

<br />

[![Edit react-floating-whatsapp](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/react-floating-whatsapp-183py?fontsize=14&hidenavigation=1&theme=dark)

Expand Down

0 comments on commit 9843949

Please sign in to comment.