rn-swipeable-panel ships its own types

Or it meant to; the types are in the repo and in package.json, so I
expect there will be a patch soon to actually ship them.
This commit is contained in:
Nathan Shively-Sanders 2020-08-13 10:55:53 -07:00
parent 99fccde322
commit cec9368206
5 changed files with 7 additions and 123 deletions

View File

@ -2932,7 +2932,7 @@
"libraryName": "moment-timezone",
"typingsPackageName": "moment-timezone",
"sourceRepoURL": "https://github.com/moment/moment-timezone",
"asOfVersion": "0.5.30"
"asOfVersion": "0.5.30"
},
{
"libraryName": "mongodb-memory-server",
@ -4482,6 +4482,12 @@
"sourceRepoURL": "https://github.com/riot/riot",
"asOfVersion": "4.1.0"
},
{
"libraryName": "rn-swipeable-panel",
"typingsPackageName": "rn-swipeable-panel",
"sourceRepoURL": "https://github.com/enesozturk/rn-swipeable-panel",
"asOfVersion": "1.2"
},
{
"libraryName": "roads",
"typingsPackageName": "roads",

View File

@ -1,87 +0,0 @@
// Type definitions for rn-swipeable-panel 1.1
// Project: https://github.com/enesozturk/rn-swipeable-panel
// Definitions by: Enes Öztürk <https://github.com/enesozturk>
// Definitions: https://github.com/DefinitelyTyped/types/rn-swipeable-panel
import * as React from 'react';
export interface SwipeablePanelProps extends React.Props<SwipeablePanel> {
/**
* Required prop for panels actual state. Set true if you want to open panel
*/
isActive: boolean;
/**
* Set true if you want to show close button
*/
showCloseButton?: boolean;
/**
* Set true if you want to make full with panel
*/
fullWidth?: boolean;
/**
* Set true if you want to disable black background opacity
*/
noBackgroundOpacity?: boolean;
/**
* Use this prop to override panel style
*/
style?: object;
/**
* Use this prop to override close button background style
*/
closeRootStyle?: object;
/**
* Use this prop to override close button icon style
*/
closeIconStyle?: object;
/**
* Set true if you want to close panel by touching outside
*/
closeOnTouchOutside?: boolean;
/**
* Set true if you want to let panel open just large mode
*/
onlyLarge?: boolean;
/**
* Set true if you want to let panel open just small mode
*/
onlySmall?: boolean;
/**
* Set true if you want to open panel large by default
*/
openLarge?: boolean;
/**
* Set true if you want to remove gray bar
*/
noBar?: boolean;
/**
* Use this prop to override bar style
*/
barStyle?: object;
/**
* Set true if you want to make toucable outside of panel
*/
allowTouchOutside?: boolean;
// Event Handlers
/**
* Required prop to keep panel's state sync with your parent components'state. Will be fired when panel is closed. See the example project.
*/
onClose: () => void;
}
export default class SwipeablePanel extends React.Component<SwipeablePanelProps, any> {}

View File

@ -1,10 +0,0 @@
import * as React from 'react';
import SwipeablePanel from 'rn-swipeable-panel';
export const App: React.FC = () => {
const [isActive, setIsActive] = React.useState<boolean>(false);
const onClosePanel = () => setIsActive(false);
return <SwipeablePanel isActive={isActive} onClose={onClosePanel}></SwipeablePanel>;
};

View File

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

View File

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