Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,14 @@
"url": "https://github.com/Ajackster/react-native-global-props"
},
"main": "./src",
"types": "./src/index.d.ts",
"peerDependencies": {
"@types/react-native": "*",
"react": "*",
"react-native": "*"
},
"devDependencies": {
"@types/react-native": "^0.62.10",
"babel-jest": "17.0.2",
"babel-preset-react-native": "1.9.0",
"eslint": "^3.12.0",
Expand Down
63 changes: 63 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
declare module 'react-native-global-props' {

import {
ActivityIndicatorProps,
ImageProps,
KeyboardAvoidingViewProps,
ListViewProps,
ModalProps,
PickerProps,
RefreshControlProps,
ScrollViewProps,
SliderProps,
StatusBarProps,
SwitchProps,
TextInputProps,
TextProps,
TouchableHighlightProps,
TouchableNativeFeedbackProps,
TouchableOpacityProps,
TouchableWithoutFeedbackProps,
ViewProps,
} from 'react-native'

declare function setCustomView(customViewProps: ViewProps): void

declare function setCustomTextInput(customTextInputProps: TextInputProps): void

declare function setCustomText(customTextProps: TextProps): void

declare function setCustomImage(customImageProps: ImageProps): void

declare function setCustomTouchableHighlight(customTouchableHighlightProps: TouchableHighlightProps): void

declare function setCustomTouchableNativeFeedback(customTouchableNativeFeedbackProps: TouchableNativeFeedbackProps): void

declare function setCustomTouchableWithoutFeedback(customTouchableWithoutFeedbackProps: TouchableWithoutFeedbackProps): void

declare function setCustomTouchableOpacity(customTouchableOpacityProps: TouchableOpacityProps): void

declare function setCustomActivityIndicator(customActivityIndicatorProps: ActivityIndicatorProps): void

declare function setCustomKeyboardAvoidingView(customKeyboardAvoidingViewProps: KeyboardAvoidingViewProps): void

declare function setCustomModal(customModalProps: ModalProps): void

declare function setCustomPicker(customPickerProps: PickerProps): void

declare function setCustomRefreshControl(customRefreshControlProps: RefreshControlProps): void

declare function setCustomScrollView(customScrollViewProps: ScrollViewProps): void

declare function setCustomSlider(customSliderProps: SliderProps): void

declare function setCustomStatusBar(customStatusBarProps: StatusBarProps): void

declare function setCustomSwitch(customSwitchProps: SwitchProps): void

// Deprecated components
declare function setCustomListView(customListViewProps: ListViewProps): void

declare function setCustomWebView(customWebViewProps: any): void

}
Loading