mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
Added definitions for react-native-material-design-searchbar
This commit is contained in:
parent
fc73cdd92b
commit
a3f1955c46
41
types/react-native-material-design-searchbar/index.d.ts
vendored
Normal file
41
types/react-native-material-design-searchbar/index.d.ts
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
// Type definitions for react-native-material-design-searchbar 1.1
|
||||
// Project: https://github.com/ananddayalan/react-native-material-design-searchbar
|
||||
// Definitions by: Kyle Roach <https://github.com/iRoachie>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
import * as React from 'react';
|
||||
import {
|
||||
TextInputProperties,
|
||||
ReturnKeyType,
|
||||
ReturnKeyTypeAndroid,
|
||||
TextStyle,
|
||||
ReturnKeyTypeIOS,
|
||||
} from 'react-native';
|
||||
|
||||
export interface SearchBarProps {
|
||||
height: number;
|
||||
autoCorrect?: boolean;
|
||||
returnKeyType?: ReturnKeyType | ReturnKeyTypeAndroid | ReturnKeyTypeIOS;
|
||||
placeholder?: string;
|
||||
padding?: number;
|
||||
inputStyle?: TextStyle;
|
||||
iconCloseName?: string;
|
||||
iconSearchName?: string;
|
||||
iconBackName?: string;
|
||||
iconSize?: number;
|
||||
iconPadding?: number;
|
||||
placeholderColor?: string;
|
||||
iconColor?: string;
|
||||
textStyle?: TextStyle;
|
||||
inputProps?: TextInputProperties;
|
||||
onSearchChange?(text: string): void;
|
||||
onClose?(): void;
|
||||
onBlur?(): void;
|
||||
onEndEditing?(): void;
|
||||
onSubmitEditing?(): void;
|
||||
onFocus?(): void;
|
||||
onBackPress?(): void;
|
||||
}
|
||||
|
||||
export default class SearchBar extends React.Component<SearchBarProps, any> {}
|
||||
@ -0,0 +1,19 @@
|
||||
import * as React from 'react';
|
||||
import SearchBar from 'react-native-material-design-searchbar';
|
||||
|
||||
class SearchbarTest extends React.Component<any, any> {
|
||||
render() {
|
||||
return (
|
||||
<SearchBar
|
||||
onSearchChange={() => console.log('On Search Change')}
|
||||
height={50}
|
||||
onFocus={() => console.log('On Focus')}
|
||||
onBlur={() => console.log('On Blur')}
|
||||
placeholder={'Search...'}
|
||||
autoCorrect={false}
|
||||
padding={5}
|
||||
returnKeyType={'search'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
24
types/react-native-material-design-searchbar/tsconfig.json
Normal file
24
types/react-native-material-design-searchbar/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"jsx": "react"
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-native-material-design-searchbar-tests.tsx"
|
||||
]
|
||||
}
|
||||
1
types/react-native-material-design-searchbar/tslint.json
Normal file
1
types/react-native-material-design-searchbar/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Loading…
Reference in New Issue
Block a user