Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript declaration file #59

Open
forgowhisky opened this issue Dec 14, 2021 · 3 comments
Open

Typescript declaration file #59

forgowhisky opened this issue Dec 14, 2021 · 3 comments

Comments

@forgowhisky
Copy link

Please add a ts decl. file so that I can use this in my ts project,

My project is enterprise and I would like to use this package instead of the over complicated "go to" packages found elsewhere.

@cedricdelpoux
Copy link
Owner

Hi, I don't use typescript but PR are welcome if you want you add it.

@franciscoxrra
Copy link

@forgowhisky Just add this to your index.d.ts:

declare module 'react-simple-tooltip' {
  const Tooltip: React.FC<{
    arrow?: number,	// 8
    background?: string,	// "#000"
    border?: string,	// "#000"
    color?:	string,	// "#fff"
    content:	any, // -
    customCss?:	any, // -
    fadeDuration?:	number,	// 0
    fadeEasing?: string, //	"linear"
    fixed?: boolean,	// false
    fontFamily?: boolean,	// "inherit"
    fontSize?: boolean, // "inherit"
    padding?:	number,	//	16
    placement?:	"left" | "top" | "right" | "bottom", //	"top"
    radius?:	number, //	0
    zIndex?:	number,	//	1
  }>
  export = Tooltip
}

@cedricdelpoux
Copy link
Owner

Can someone open a PR to add it? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants