diff --git a/app/components/team_sidebar/add_team/add_team_slide_up.tsx b/app/components/team_sidebar/add_team/add_team_slide_up.tsx index 48ece80b3..e6990a91c 100644 --- a/app/components/team_sidebar/add_team/add_team_slide_up.tsx +++ b/app/components/team_sidebar/add_team/add_team_slide_up.tsx @@ -64,7 +64,7 @@ export default function AddTeamSlideUp({otherTeams, title, showTitle = true}: Pr } }, [serverUrl]); - const hasOtherTeams = otherTeams.length; + const hasOtherTeams = Boolean(otherTeams.length); return ( { @@ -62,12 +65,13 @@ export default function AddTeam({otherTeams}: Props) { ); }; - bottomSheetWithTeamList({ - dimensions, + const height = getTeamsSnapHeight({dimensions, teams: otherTeams, insets}); + bottomSheet({ + closeButtonId: 'close-team_list', renderContent, + snapPoints: [height, 10], theme, title, - teams: otherTeams, }); }), [otherTeams, intl, isTablet, dimensions, theme]); diff --git a/app/components/team_sidebar/add_team/team_list_item/team_list_item.tsx b/app/components/team_sidebar/add_team/team_list_item/team_list_item.tsx index 0182bf0d3..d5b20b225 100644 --- a/app/components/team_sidebar/add_team/team_list_item/team_list_item.tsx +++ b/app/components/team_sidebar/add_team/team_list_item/team_list_item.tsx @@ -22,22 +22,16 @@ type Props = { onPress: (teamId: string) => void; } -const CONTAINER_HEIGHT = 40; -const CONTAINER_VERTICAL_MARGIN = 8; -export const ITEM_HEIGHT = CONTAINER_HEIGHT + (CONTAINER_VERTICAL_MARGIN * 2); +export const ITEM_HEIGHT = 56; const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { return { - container: { - height: CONTAINER_HEIGHT, - marginVertical: CONTAINER_VERTICAL_MARGIN, - }, touchable: { + height: ITEM_HEIGHT, display: 'flex', flexDirection: 'row', borderRadius: 4, alignItems: 'center', - height: '100%', width: '100%', }, text: { @@ -69,39 +63,37 @@ export default function TeamListItem({team, textColor, iconTextColor, iconBackgr }, [team.id, onPress]); return ( - - + + + + - - - - - {displayName} - - {(team.id === selectedTeamId) && - - - - } - - + {displayName} + + {(team.id === selectedTeamId) && + + + + } + ); } diff --git a/app/screens/bottom_sheet/content.tsx b/app/screens/bottom_sheet/content.tsx index 498cb9ddb..bfdd56f9e 100644 --- a/app/screens/bottom_sheet/content.tsx +++ b/app/screens/bottom_sheet/content.tsx @@ -27,8 +27,8 @@ const TITLE_MARGIN_TOP = 4; const TITLE_MARGIN_BOTTOM = 12; export const TITLE_HEIGHT = TITLE_MARGIN_TOP + TITLE_MARGIN_BOTTOM + 30; // typography 600 line height -export const SEPARATOR_MARGIN = 12; -export const SEPARATOR_MARGIN_TABLET = 20; +export const TITLE_SEPARATOR_MARGIN = 12; +export const TITLE_SEPARATOR_MARGIN_TABLET = 20; const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { return { @@ -76,14 +76,14 @@ const BottomSheetContent = ({buttonText, buttonIcon, children, disableButton, on } {titleSeparator && - + } <> {children} {showButton && ( <> - +