You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fully customizable React component for copying email from `mailto` links.
6
9
7
10
## Motivation
8
-
The one thing we all can agree on that we hate it when the default mail app pops up after clicking on the `mailto` links. Most of the time we just want to copy the email address and that's where this module comes into play.
11
+
The one thing we all can agree on that we hate it when the default mail app pops up after clicking on the `mailto` links. Most of the time we just want to copy the email address and that's where this module comes into play. Big shout out to [Kuldar](https://twitter.com/kkuldar) whose tweet [thread](https://twitter.com/kkuldar/status/1270736717939716097) inspired us to build this.
9
12
10
13
11
14
## Demo
@@ -46,13 +49,14 @@ You can customize almost every aspect of this component using the below props, o
46
49
47
50
| Name | Type | Default | Description |
48
51
|:-: |--- |--- |--- |
49
-
| email | string | none | The email to be copied |
52
+
| email | string | none | The email to be copied.|
50
53
| children | ReactNode | null | Use this if you want to use some custom component inside the anchor tag. |
51
54
| defaultTooltip | string | "Copy email address" | Text shown in the tooltip when the user hovers over the link. |
52
55
| copiedTooltip | string | "Copied to clipboard!" | Text shown in the tooltip when the user clicks on the link and the text is copied to clipboard. |
53
-
| containerStyles | style object | none | The styles to be applied to the container |
54
-
| tooltipStyles | style object | none | The styles to be applied to the tooltip |
55
-
| anchorStyles | style object | none | The styles to be applied to the anchor |
56
+
| containerStyles | style object | none | The styles to be applied to the container. |
57
+
| tooltipStyles | style object | none | The styles to be applied to the tooltip. |
58
+
| anchorStyles | style object | none | The styles to be applied to the anchor. |
59
+
| tooltipPosition | string | "above" | The position of the tooltip. |
56
60
57
61
## Development
58
62
@@ -78,3 +82,23 @@ Feel free to open [issues](https://github.com/devfolioco/react-copy-mailto/issue
0 commit comments