diff --git a/types/react-show-more/index.d.ts b/types/react-show-more/index.d.ts new file mode 100644 index 0000000000..c220c14f05 --- /dev/null +++ b/types/react-show-more/index.d.ts @@ -0,0 +1,18 @@ +// Type definitions for react-show-more 2.0 +// Project: https://github.com/One-com/react-show-more +// Definitions by: Naor Torgeman +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import * as React from 'react'; + +export interface ReactShowMoreProps { + lines?: number; + more?: string; + less?: string; + children?: string; + anchorClass?: string; +} + +declare const ShowMore: React.ClassicComponentClass; +export default ShowMore; diff --git a/types/react-show-more/react-show-more-tests.tsx b/types/react-show-more/react-show-more-tests.tsx new file mode 100644 index 0000000000..dd322ce207 --- /dev/null +++ b/types/react-show-more/react-show-more-tests.tsx @@ -0,0 +1,13 @@ +import ShowMore from 'react-show-more'; +import * as React from 'react'; + +const longText = "scenester Banksy single-origin coffee squid flannel XOXO chillwave Helvetica plaid slow-carb drinking vinegar Wes Anderson gastropub"; + + + {longText} +; diff --git a/types/react-show-more/tsconfig.json b/types/react-show-more/tsconfig.json new file mode 100644 index 0000000000..faea22ea33 --- /dev/null +++ b/types/react-show-more/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "jsx": "react", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-show-more-tests.tsx" + ] +} diff --git a/types/react-show-more/tslint.json b/types/react-show-more/tslint.json new file mode 100644 index 0000000000..233d143cc0 --- /dev/null +++ b/types/react-show-more/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file