diff --git a/app/containers/SearchHeader.js b/app/containers/SearchHeader.js deleted file mode 100644 index e231d074..00000000 --- a/app/containers/SearchHeader.js +++ /dev/null @@ -1,49 +0,0 @@ -import React from 'react'; -import { StyleSheet, View } from 'react-native'; -import PropTypes from 'prop-types'; - -import { withTheme } from '../theme'; -import sharedStyles from '../views/Styles'; -import { themes } from '../constants/colors'; -import TextInput from '../presentation/TextInput'; -import { isIOS, isTablet } from '../utils/deviceInfo'; -import { useOrientation } from '../dimensions'; - -const styles = StyleSheet.create({ - container: { - flex: 1, - justifyContent: 'center', - marginLeft: 0 - }, - title: { - ...sharedStyles.textSemibold - } -}); - -// TODO: it might be useful to refactor this component for reusage -const SearchHeader = ({ theme, onSearchChangeText }) => { - const titleColorStyle = { color: themes[theme].headerTitleColor }; - const isLight = theme === 'light'; - const { isLandscape } = useOrientation(); - const scale = isIOS && isLandscape && !isTablet ? 0.8 : 1; - const titleFontSize = 16 * scale; - - return ( - - - - ); -}; - -SearchHeader.propTypes = { - theme: PropTypes.string, - onSearchChangeText: PropTypes.func -}; -export default withTheme(SearchHeader); diff --git a/app/containers/SearchHeader.tsx b/app/containers/SearchHeader.tsx index 3f5bf4b9..e6c53526 100644 --- a/app/containers/SearchHeader.tsx +++ b/app/containers/SearchHeader.tsx @@ -19,7 +19,7 @@ const styles = StyleSheet.create({ }); interface ISearchHeaderProps { - onSearchChangeText(): void; + onSearchChangeText?: (text: string) => void; placeholder: string; theme: string; testID: string;