UNPKG

@eslam-elmeniawy/react-native-common-components

Version:

Common `ReactNative` components packed in library for usage in projects.

32 lines (29 loc) 839 B
"use strict"; // External imports. import * as React from 'react'; import { I18nManager } from 'react-native'; // Types imports. import DefaultInput from "../TextInput/DefaultInput.js"; import { jsx as _jsx } from "react/jsx-runtime"; const SearchInput = /*#__PURE__*/React.memo(props => { const { searchComponent, searchLabel, theme, onChangeText } = props; if (searchComponent) { return searchComponent; } const _isArabic = (I18nManager.getConstants().localeIdentifier?.indexOf('ar') ?? -1) > -1; return /*#__PURE__*/_jsx(DefaultInput, { mode: "outlined", label: searchLabel ?? (_isArabic ? 'ابحث عن' : 'Look for'), onChangeText: onChangeText, style: { backgroundColor: theme.colors.surface } }); }); export default SearchInput; //# sourceMappingURL=SearchInput.js.map