1import { Text } from 'expo-dev-client-components'; 2import * as React from 'react'; 3import { View as RNView, StyleSheet } from 'react-native'; 4 5import PlatformIcon from '../../../components/PlatformIcon'; 6 7type PlatformIconProps = React.ComponentProps<typeof PlatformIcon>; 8 9type DevelopmentServerTitleProps = { 10 title?: string; 11 platform?: PlatformIconProps['platform']; 12}; 13 14export function DevelopmentServerTitle({ title, platform }: DevelopmentServerTitleProps) { 15 return title ? ( 16 <RNView style={styles.titleContainer}> 17 {platform && <PlatformIcon platform={platform} />} 18 <Text style={{ flex: 1 }} type="InterSemiBold" ellipsizeMode="tail" numberOfLines={1}> 19 {title} 20 </Text> 21 </RNView> 22 ) : null; 23} 24 25const styles = StyleSheet.create({ 26 titleContainer: { 27 flexDirection: 'row', 28 alignItems: 'center', 29 marginBottom: 2, 30 }, 31}); 32