Skip to content

Commit

Permalink
fix: Set maxWidth for chip in UserItem (#2329)
Browse files Browse the repository at this point in the history
  • Loading branch information
knipec authored Oct 14, 2024
1 parent 76d98c3 commit d24f537
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion dev-client/src/screens/ProjectTeamScreen/components/UserItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

import {useMemo} from 'react';
import {useTranslation} from 'react-i18next';
import {StyleSheet, View} from 'react-native';

import {Button} from 'native-base';

Expand Down Expand Up @@ -88,7 +89,11 @@ export const UserItem = ({
<MenuItem
icon={<ProfilePic user={user} />}
label={userLabel}
chip={<RoleChip membership={membership} />}
chip={
<View style={styles.chipSection}>
<RoleChip membership={membership} />
</View>
}
onPress={isForCurrentUser ? undefined : memberAction}>
{userCanLeaveProject && (
<ConfirmModal
Expand All @@ -107,3 +112,9 @@ export const UserItem = ({
</MenuItem>
);
};

const styles = StyleSheet.create({
chipSection: {
maxWidth: 150,
},
});

0 comments on commit d24f537

Please sign in to comment.