introducing MailgoConfig
This commit is contained in:
parent
1eba37acce
commit
eb2e4bb9db
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
|
||||
const MAILTO: string = "mailto:";
|
||||
const TEL: string = "tel:";
|
||||
@ -830,7 +832,7 @@ const mailgoStyle = (): void => {
|
||||
};
|
||||
|
||||
// mailgo
|
||||
const mailgo = (mailgoConfig?: any): void => {
|
||||
const mailgo = (mailgoConfig?: MailgoConfig): void => {
|
||||
// if the window is defined...
|
||||
if (window && typeof window !== "undefined") {
|
||||
// add the style for mailgo
|
||||
|
Loading…
x
Reference in New Issue
Block a user