mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-01 15:50:13 +00:00
Merge pull request #33286 from hmajid2301/react-native-snackbar-component
Added react-native-snackbar-component
This commit is contained in:
26
types/react-native-snackbar-component/index.d.ts
vendored
Normal file
26
types/react-native-snackbar-component/index.d.ts
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
// Type definitions for react-native-snackbar-components 1.1
|
||||
// Project: https://github.com/sidevesh/react-native-snackbar
|
||||
// Definitions by: Haseeb Majid <https://github.com/hmajid2301>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.8
|
||||
|
||||
import * as React from 'react';
|
||||
import { TextStyle } from 'react-native';
|
||||
|
||||
export interface SnackbarComponentProps {
|
||||
accentColor?: string;
|
||||
actionText?: string;
|
||||
messageColor?: string;
|
||||
backgroundColor?: string;
|
||||
distanceCallback?: () => void;
|
||||
actionHandler?: () => 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>
|
||||
);
|
||||
}
|
||||
}
|
||||
24
types/react-native-snackbar-component/tsconfig.json
Normal file
24
types/react-native-snackbar-component/tsconfig.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react-native"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-native-snackbar-component-tests.tsx"
|
||||
]
|
||||
}
|
||||
1
types/react-native-snackbar-component/tslint.json
Normal file
1
types/react-native-snackbar-component/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user