react-simple-tooltip icon indicating copy to clipboard operation
react-simple-tooltip copied to clipboard

Typescript declaration file

Open forgowhisky opened this issue 4 years ago • 3 comments

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.

forgowhisky avatar Dec 14 '21 22:12 forgowhisky

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

cedricdelpoux avatar Dec 15 '21 06:12 cedricdelpoux

@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
}

franciscoxrra avatar Feb 08 '23 11:02 franciscoxrra

Can someone open a PR to add it? Thanks

cedricdelpoux avatar Feb 08 '23 13:02 cedricdelpoux