Skip to content

Commit

Permalink
feat: ⚛ added right jsx props for Search
Browse files Browse the repository at this point in the history
  • Loading branch information
zheleznov163 committed Jun 14, 2022
1 parent 10e98ff commit 200b12d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions screens/Profile/components/atoms/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ import { TextInput } from "react-native-gesture-handler";
type SearchProps = TextInputProps & {
loupe?: boolean;
bottomsheet?: boolean;
Right?: JSX.Element;
};

export default ({
style,
loupe = true,
bottomsheet = true,
Right,
...props
}: SearchProps) => {
const Input = bottomsheet ? BottomSheetTextInput : TextInput;
Expand All @@ -22,6 +24,7 @@ export default ({
<Input
style={styles.input}
placeholderTextColor={hexAlpha(COLOR.White, 50)}
keyboardAppearance="dark"
{...props}
/>
{loupe && (
Expand All @@ -33,6 +36,7 @@ export default ({
/>
</View>
)}
{Right && <View style={styles.right}>{Right}</View>}
</View>
);
};
Expand All @@ -54,4 +58,8 @@ const styles = StyleSheet.create({
alignItems: "center",
justifyContent: "center",
},
right: {
alignItems: "center",
justifyContent: "center",
},
});

0 comments on commit 200b12d

Please sign in to comment.