Skip to content

Commit

Permalink
feat: 💅 added focus styles
Browse files Browse the repository at this point in the history
  • Loading branch information
zheleznov163 committed Jun 22, 2022
1 parent 0933295 commit 254c0e1
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion screens/Profile/components/atoms/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ type SearchProps = TextInputProps & {
loupe?: boolean;
bottomsheet?: boolean;
Right?: JSX.Element;
isFocus?: boolean;
};

export default ({
style,
loupe = true,
bottomsheet = true,
Right,
isFocus,
...props
}: SearchProps) => {
const Input = bottomsheet ? BottomSheetTextInput : TextInput;
console.log("isFocus", isFocus);

return (
<View style={[styles.container, style]}>
<View
style={[styles.container, isFocus && styles.container_focused, style]}
>
<Input
style={styles.input}
placeholderTextColor={hexAlpha(COLOR.White, 50)}
Expand Down Expand Up @@ -49,6 +54,10 @@ const styles = StyleSheet.create({
flexDirection: "row",
paddingLeft: 25,
},
container_focused: {
borderWidth: 2,
borderColor: COLOR.Marengo,
},
input: {
flex: 1,
color: COLOR.White,
Expand Down

0 comments on commit 254c0e1

Please sign in to comment.