introducing MailgoConfig
This commit is contained in:
7
index.d.ts
vendored
7
index.d.ts
vendored
@@ -1,7 +0,0 @@
|
|||||||
// Type definitions for mailgo
|
|
||||||
// Project: mailgo
|
|
||||||
// Definitions by: Matteo Manzinello <https://matteomanzinello.com>
|
|
||||||
|
|
||||||
export as namespace Mailgo;
|
|
||||||
|
|
||||||
export function mailgo(mailgoConfig?: any): void;
|
|
||||||
9
mailgo.d.ts
vendored
Normal file
9
mailgo.d.ts
vendored
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
// Type definitions for mailgo
|
||||||
|
// Project: mailgo
|
||||||
|
// Definitions by: Matteo Manzinello <https://matteomanzinello.com>
|
||||||
|
|
||||||
|
export type MailgoConfig = {
|
||||||
|
initEvent?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function mailgo(mailgoConfig?: MailgoConfig): void;
|
||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { MailgoConfig } from "../mailgo";
|
||||||
|
|
||||||
// links
|
// links
|
||||||
const MAILTO: string = "mailto:";
|
const MAILTO: string = "mailto:";
|
||||||
const TEL: string = "tel:";
|
const TEL: string = "tel:";
|
||||||
@@ -830,7 +832,7 @@ const mailgoStyle = (): void => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// mailgo
|
// mailgo
|
||||||
const mailgo = (mailgoConfig?: any): void => {
|
const mailgo = (mailgoConfig?: MailgoConfig): void => {
|
||||||
// if the window is defined...
|
// if the window is defined...
|
||||||
if (window && typeof window !== "undefined") {
|
if (window && typeof window !== "undefined") {
|
||||||
// add the style for mailgo
|
// add the style for mailgo
|
||||||
|
|||||||
Reference in New Issue
Block a user