mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-15 14:30:22 +00:00
Added react-native-snackbar-component
Added typedefinitions for react-native-snackbar-component, https://github.com/SiDevesh/React-Native-SnackBar-Component
This commit is contained in:
@@ -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 <https://github.com/hmajid2301>
|
||||
// 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<SnackbarComponentProps> {}
|
||||
@@ -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 (
|
||||
<View>
|
||||
<SnackbarComponent
|
||||
autoHidingTime={2000}
|
||||
actionText={"OPEN"}
|
||||
textMessage="Hello"
|
||||
visible={true}
|
||||
/>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json",
|
||||
}
|
||||
Reference in New Issue
Block a user