Files
inji-wallet/components/ui/SearchBar.tsx
jaswanthkumartw 0e667bd46d Injimob-3651: revert all the branding changes (#2151)
* Revert "[INJIMOB-3622] Fix alignment in history screen  (#2140)"

This reverts commit a0b08914e5.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "Injimob [3622] [3627] - BANNER ISSUE AND BRANDING CHANGES ISSUES  (#2130)"

This reverts commit 522104811c.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "[INJIMOB-3633][INJIMOB-3636] fix icon bg color across app (#2134)"

This reverts commit d8d718693d.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* Revert "[INJIMOB-3633] fix search bar clear icon not apperaing (#2133)"

This reverts commit 6a202b11af.

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: revert all the branding changes

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

* [INJIMOB-3651]: update all the snapshot

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>

---------

Signed-off-by: jaswanthkumarpolisetty <jaswanthkumar.p@thoughtworks.com>
2025-11-28 18:59:15 +05:30

61 lines
1.4 KiB
TypeScript

import React from 'react';
import {TextInput, View} from 'react-native';
import {Icon} from 'react-native-elements';
import {Row} from './Layout';
import {Theme} from './styleUtils';
import {SvgImage} from './svg';
export const SearchBar = ({
isVcSearch = false,
searchIconTestID,
searchBarTestID,
placeholder,
search,
onFocus,
onChangeText,
onLayout,
editable = true,
}: SearchBarProps) => {
return (
<Row>
{isVcSearch ? (
<View
testID={searchIconTestID}
style={Theme.SearchBarStyles.vcSearchIcon}>
{SvgImage.SearchIcon()}
</View>
) : (
<Icon
testID={searchIconTestID}
name="search"
color={Theme.Colors.Icon}
size={27}
style={Theme.SearchBarStyles.searchIcon}
/>
)}
<TextInput
testID={searchBarTestID}
style={Theme.SearchBarStyles.searchBar}
placeholder={placeholder}
value={search}
onFocus={onFocus}
onChangeText={searchText => onChangeText(searchText)}
onLayout={onLayout}
editable={editable ?? true}
/>
</Row>
);
};
interface SearchBarProps {
isVcSearch: Boolean;
searchIconTestID: string;
searchBarTestID: string;
search: string;
placeholder: string;
onFocus: () => void;
onChangeText: (searchText: string) => void;
onLayout: () => void;
editable?: boolean;
}