Skip to content

Commit

Permalink
Merge pull request #339 from cultuurnet/bugfix/redeemed-rewards-and-h…
Browse files Browse the repository at this point in the history
…istory-filter

Styling fix of family filter component
  • Loading branch information
chennara authored Dec 7, 2023
2 parents 7f4e07c + d710545 commit b331a8e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 2 additions & 3 deletions src/_components/family/familyFilter/FamilyFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { FlatList } from 'react-native';

import { useGetFamilyMembers } from '../../../onboarding/family/_queries';
import { TFamilyMember, TPassHolder } from '../../../profile/_models';
import Typography from '../../typography/Typography';
import * as Styled from './style';

type TProps = {
Expand Down Expand Up @@ -49,13 +48,13 @@ export const FamilyFilter = ({ selectedPassHolder, setSelectedPassHolder }: TPro
isSelected={familyMember.passholder.id === selectedPassHolder.id}
onPress={() => handleSelectPassHolder(familyMember.passholder, index)}
>
<Typography
<Styled.FilterLabel
color={familyMember.passholder.id === selectedPassHolder.id ? 'neutral.0' : 'primary.100'}
fontStyle="bold"
size="small"
>
{familyMember.passholder.firstName}
</Typography>
</Styled.FilterLabel>
</Styled.FilterItem>
)}
showsHorizontalScrollIndicator={false}
Expand Down
7 changes: 6 additions & 1 deletion src/_components/family/familyFilter/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ import styled from 'styled-components/native';

import Icon from '../../icon/Icon';
import TouchableRipple from '../../touchableRipple/TouchableRipple';
import { Typography } from '../../typography/style';

export const Container = styled.View`
flex-direction: row;
align-items: center;
background-color: ${({ theme }) => theme.palette.primary[700]};
padding-vertical: 8px;
padding-vertical: 9px;
`;

export const FilterPrevButton = styled(Icon)`
Expand All @@ -27,6 +28,10 @@ export const FilterItem = styled(TouchableRipple)<{ isSelected: boolean }>`
border-radius: 20px;
`;

export const FilterLabel = styled(Typography)`
line-height: 21px;
`;

export const Separator = styled.View`
width: 8px;
`;
2 changes: 1 addition & 1 deletion src/history/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const History: FC = () => {
<Styled.ListView>
<FlashList
ListEmptyComponent={<Styled.NoContentText align="center">{t('PROFILE.HISTORY.EMPTY')}</Styled.NoContentText>}
contentContainerStyle={{ paddingBottom: 105, paddingTop: 20 }}
contentContainerStyle={{ paddingBottom: 105, paddingTop: 24 }}
data={members}
estimatedItemSize={Styled.HISTORY_ITEM_HEIGHT}
onEndReached={fetchNextPage}
Expand Down
2 changes: 1 addition & 1 deletion src/redeemedRewards/RedeemedRewards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const RedeemedRewards = ({ navigation }: TProps) => {
</Styled.FooterLoadingContainer>
)
}
contentContainerStyle={{ paddingBottom: 105 }}
contentContainerStyle={{ paddingBottom: 105, paddingTop: 24 }}
data={members}
estimatedItemSize={MIMIMAL_REWARD_HEIGHT}
keyExtractor={item => item.id}
Expand Down

0 comments on commit b331a8e

Please sign in to comment.