react-obfuscate-email
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -7,7 +7,11 @@ # React Obfuscate Email | ||
[![CodeFactor](https://www.codefactor.io/repository/github/mauriciorobayo/react-obfuscate-email/badge)](https://www.codefactor.io/repository/github/mauriciorobayo/react-obfuscate-email) | ||
[![bundlephobia](https://badgen.net/bundlephobia/minzip/react-obfuscate-email)](https://bundlephobia.com/package/react-obfuscate-email) | ||
📧 React component to obfuscate email links. | ||
📧🚫🤖 **Simple and lightweight email obfuscator React component**. | ||
[Storybook](https://www.mauriciorobayo.com/react-obfuscate-email) | ||
- No dependencies | ||
- Tree-shakeable | ||
Read the [documentation 📘](https://www.mauriciorobayo.com/react-obfuscate-email). | ||
## Usage | ||
@@ -63,11 +67,17 @@ | ||
The component also accepts `body` and `subject` props that will be properly encoded for the link: | ||
The component also accepts `body`, `subject`, `cc`, and `bcc` props that will be properly encoded for the link: | ||
```jsx | ||
<Email email="test@example.com" body="You rock!" subject="Hello 👋" /> | ||
email="test@example.com" | ||
body="You rock!" | ||
subject="Hello 👋" | ||
cc={["cc1@example.com", "cc2@example.com"]} | ||
bcc={["bcc@example.com"]} | ||
/> | ||
``` | ||
Will properly produce `test@example.com?body=You%20rock!&subject=Hello%20%F0%9F%91%8B` as the `href` attribute once human interaction is detected (notice spaces are percent encoded instead of being replaced with '+'). | ||
Will properly produce `test@example.com?body=You%20rock!&subject=Hello%20%F0%9F%91%8B&cc=cc1%40example.com%2Ccc2%40example.com&bcc=bcc%40example.com` as the `href` attribute once human interaction is detected (notice spaces are percent encoded instead of being replaced with '+'). | ||
You can also include the `_target` attribute (or any other `a` attribute): | ||
You can also include the `_target` attribute (or any other `a` tag attribute): | ||
@@ -74,0 +84,0 @@ ```jsx |
8812
112