add types to react-ellipsis-with-tooltip (#47351)

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

* add types to react-ellipsis-with-tooltip

Co-authored-by: Piotr Bender <piotr.bender@silevis.com>
This commit is contained in:
Piotr Bender 2020-09-09 22:42:15 +02:00 committed by GitHub
parent e7eef8abc2
commit dd185890c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 72 additions and 0 deletions

View File

@ -0,0 +1,32 @@
// Type definitions for react-ellipsis-with-tooltip 1.1
// Project: https://github.com/amirfefer/react-ellipsis-with-tooltip
// Definitions by: Piotr Bender <https://github.com/SIN3d73>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
import * as React from 'react';
export interface EllipsisWithTooltipProps {
placement?: 'auto-start'
| 'auto'
| 'auto-end'
| 'top-start'
| 'top'
| 'top-end'
| 'right-start'
| 'right'
| 'right-end'
| 'bottom-end'
| 'bottom'
| 'bottom-start'
| 'left-end'
| 'left'
| 'left-start';
style?: React.CSSProperties;
delayShow?: number;
delayHide?: number;
children: React.ReactNode;
}
declare class EllipsisWithTooltip extends React.Component<EllipsisWithTooltipProps> {}
export default EllipsisWithTooltip;

View File

@ -0,0 +1,3 @@
{
"private": true
}

View File

@ -0,0 +1,11 @@
import * as React from 'react';
import EllipsisWithTooltip from 'react-ellipsis-with-tooltip';
<EllipsisWithTooltip
placement="bottom"
delayShow={10}
delayHide={10}
style={{ maxWidth: 300 }}
>
test123
</EllipsisWithTooltip>;

View File

@ -0,0 +1,25 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react"
},
"files": [
"index.d.ts",
"react-ellipsis-with-tooltip-tests.tsx"
]
}

View File

@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }