react-sticky-box: Provides its own types (#39528)

This commit is contained in:
Alexander T
2019-10-28 10:27:50 -07:00
committed by Jesse Trinity
parent c184453248
commit 8a82e516a8
5 changed files with 6 additions and 68 deletions
+6
View File
@@ -3186,6 +3186,12 @@
"sourceRepoURL": "https://github.com/tomkp/react-split-pane",
"asOfVersion": "0.1.67"
},
{
"libraryName": "react-sticky-box",
"typingsPackageName": "react-sticky-box",
"sourceRepoURL": "https://github.com/codecks-io/react-sticky-box",
"asOfVersion": "0.8.0"
},
{
"libraryName": "react-svg",
"typingsPackageName": "react-svg",
-22
View File
@@ -1,22 +0,0 @@
// Type definitions for react-sticky-box 0.7
// Project: https://github.com/codecks-io/react-sticky-box, https://github.com/danielberndt/react-sticky-box
// Definitions by: Konstantin Lebedev <https://github.com/koss-lebedev>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.8
import * as React from "react";
declare namespace ReactStickyBox {
type StickyBoxMode = 'relative' | 'stickyBottom' | 'stickyTop';
interface StickyBoxProps {
bottom?: boolean;
offsetTop?: number;
offsetBottom?: number;
onChangeMode?: (oldMode: StickyBoxMode, newMode: StickyBoxMode) => void;
}
}
declare const ReactStickyBox: React.ComponentClass<ReactStickyBox.StickyBoxProps>;
export = ReactStickyBox;
@@ -1,19 +0,0 @@
import ReactStickyBox, { StickyBoxMode } from "react-sticky-box";
import * as React from "react";
const ReactStickyBoxRequiredOptions: JSX.Element = (
<ReactStickyBox />
);
const changeHandler = (oldMode: StickyBoxMode, newMode: StickyBoxMode) => {
console.log(`Changing from ${oldMode} to ${newMode}`);
};
const ReactStickyBoxAllOptions: JSX.Element = (
<ReactStickyBox
bottom
offsetBottom={20}
offsetTop={10}
onChangeMode={changeHandler}
/>
);
-26
View File
@@ -1,26 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6",
"dom"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"esModuleInterop": true
},
"files": [
"index.d.ts",
"react-sticky-box-tests.tsx"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }