import React from 'react'; import { View, Text, StyleSheet, StyleProp, TextStyle, ViewStyle } from 'react-native'; import { Platform } from './index.types'; function joinWithCamelCase([first, second]: [ H, T, ]): `${H}${Capitalize}` { return `${first}${second.charAt(0).toUpperCase()}${second.slice(1)}` as `${H}${Capitalize}`; } function PlatformIndicator({ platform, textStyle }: { platform: Platform; textStyle?: TextStyle }) { return ( {platform} ); } export default function Platforms({ platforms, style, textStyle, }: { platforms: Platform[]; style?: StyleProp; textStyle?: TextStyle; }) { return ( {platforms.map((platform) => ( ))} ); } const styles = StyleSheet.create({ container: { position: 'absolute', top: -2, left: 0, flexDirection: 'row', }, platform: { borderRadius: 10, paddingHorizontal: 3, marginRight: 2, }, platformAndroid: { backgroundColor: '#79bf2d', }, platformIos: { backgroundColor: '#909090', }, platformWeb: { backgroundColor: '#4b4bff', }, platformText: { fontSize: 6, color: 'white', }, });