Browse Source

FIX | Fix selected checkbox styles

fix/sprint-7
Oksana Stepanenko 2 years ago
parent
commit
bf883f63bc
  1. 4
      src/modules/chats/components/select-chat-list-item.component.tsx
  2. 4
      src/modules/chats/screens/forward-message.screen.tsx
  3. 4
      src/modules/users/components/user-list-item.component.tsx
  4. 6
      src/shared/components/elements/checkbox.component.tsx

4
src/modules/chats/components/select-chat-list-item.component.tsx

@ -38,8 +38,8 @@ export const SelectChatListItem: FC<IProps> = ({ @@ -38,8 +38,8 @@ export const SelectChatListItem: FC<IProps> = ({
<View style={styles.checkBox}>
<CheckBox
isChecked={isChecked}
isDisabled={!isDisabled}
onPress={() => {}}
isDisabled={isDisabled}
onPress={onSelectItem}
/>
</View>
</TouchableOpacity>

4
src/modules/chats/screens/forward-message.screen.tsx

@ -9,7 +9,7 @@ import { @@ -9,7 +9,7 @@ import {
SearchWithBtn,
useTheme,
} from '@/shared'
import { StyleSheet, View } from 'react-native'
import { FlatList, StyleSheet, View } from 'react-native'
import Animated from 'react-native-reanimated'
import { SelectChatListItem, SelectedChatsRow } from '../components'
import { PartialTheme } from '@/shared/themes/interfaces'
@ -100,7 +100,7 @@ export const ForwardMessageScreen: FC<IProps> = ({ @@ -100,7 +100,7 @@ export const ForwardMessageScreen: FC<IProps> = ({
btnTitle="Вибрати всі"
placeholder="Знайдіть бесіду"
/>
<Animated.FlatList
<FlatList
data={chats}
contentContainerStyle={styles.contentContainerStyle}
initialNumToRender={10}

4
src/modules/users/components/user-list-item.component.tsx

@ -36,8 +36,8 @@ export const UserListItem: FC<IProps> = ({ @@ -36,8 +36,8 @@ export const UserListItem: FC<IProps> = ({
<View style={styles.checkBox}>
<CheckBox
isChecked={isChecked}
isDisabled={!isDisabled}
onPress={() => {}}
isDisabled={isDisabled}
onPress={onSelectItem}
/>
</View>
</TouchableOpacity>

6
src/shared/components/elements/checkbox.component.tsx

@ -31,7 +31,7 @@ export const CheckBox: FC<IProps> = ({ @@ -31,7 +31,7 @@ export const CheckBox: FC<IProps> = ({
<IconComponent
name="checksquare-1-1"
color={
isChecked && isDisabled
isChecked && !isDisabled
? theme.iconComponent.$selectedIcon
: theme.iconComponent.$primaryColor
}
@ -42,8 +42,8 @@ export const CheckBox: FC<IProps> = ({ @@ -42,8 +42,8 @@ export const CheckBox: FC<IProps> = ({
<IconComponent
color={
isDisabled
? theme.iconComponent.$selectedIcon
: theme.iconComponent.$primaryColor
? theme.iconComponent.$primaryColor
: theme.iconComponent.$selectedIcon
}
style={styles.check}
name={'check-1'}

Loading…
Cancel
Save