diff --git a/types/react-native-snackbar-component/index.d.ts b/types/react-native-snackbar-component/index.d.ts new file mode 100644 index 0000000000..d0851d0371 --- /dev/null +++ b/types/react-native-snackbar-component/index.d.ts @@ -0,0 +1,24 @@ +// Type definitions for react-native-snackbar-components 1.1.0 +// Project: https://github.com/SiDevesh/React-Native-SnackBar-Component +// Definitions by: Haseeb Majid +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped + +import * as React from 'react'; +import { TextStyle } from 'react-native'; + +export interface SnackbarComponentProps { + accentColor?: string; + actionText?: string; + messageColor?: string; + backgroundColor?: string; + distanceCallback?: () => void; + left?: number; + right?: number; + bottom?: number; + position?: string; + textMessage?: string; + autoHidingTime?: number; + visible?: boolean; +} + +export default class SnackbarComponent extends React.Component {} \ No newline at end of file diff --git a/types/react-native-snackbar-component/react-native-snackbar-component-tests.tsx b/types/react-native-snackbar-component/react-native-snackbar-component-tests.tsx new file mode 100644 index 0000000000..1888715502 --- /dev/null +++ b/types/react-native-snackbar-component/react-native-snackbar-component-tests.tsx @@ -0,0 +1,18 @@ +import * as React from "react"; +import { View } from "react-native"; +import SnackbarComponent from "react-native-snackbar-component"; + +class SnackbarComponentTest extends React.Component { + render() { + return ( + + + + ); + } +} \ No newline at end of file diff --git a/types/react-native-snackbar-component/tsconfig.json b/types/react-native-snackbar-component/tsconfig.json new file mode 100644 index 0000000000..a731bca5f7 --- /dev/null +++ b/types/react-native-snackbar-component/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "jsx": "react-native", + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": false, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + }, + "files": [ + "index.d.ts", + "react-native-snackbar-component-tests.tsx" + ] +} \ No newline at end of file diff --git a/types/react-native-snackbar-component/tslint.json b/types/react-native-snackbar-component/tslint.json new file mode 100644 index 0000000000..e595b70d63 --- /dev/null +++ b/types/react-native-snackbar-component/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json", +}