Open History to see the last commit
1import Constants from "expo-constants";
2import { Image } from "expo-image";
3import { View } from "react-native";
4
5import { AppText as Text } from "./AppText";
6
7const appVariant = Constants.expoConfig?.extra?.appVariant;
8const BRAND_MARK_SOURCE =
9 appVariant === "development"
10 ? require("../../../../assets/dev/blueprint-ios-1024.png")
11 : appVariant === "preview"
12 ? require("../../../../assets/nightly/nightly-ios-1024.png")
13 : require("../../../../assets/prod/black-ios-1024.png");
14const DEFAULT_STAGE_LABEL =
15 appVariant === "development" ? "Dev" : appVariant === "preview" ? "Preview" : "Alpha";
16
17export function BrandMark(props: { readonly compact?: boolean; readonly stageLabel?: string }) {
18 const compact = props.compact ?? false;
19 const iconSize = compact ? 32 : 44;
20 const stageLabel = props.stageLabel ?? DEFAULT_STAGE_LABEL;
21
22 return (
23 <View className="flex-row items-center gap-3">
24 <Image
25 source={BRAND_MARK_SOURCE}
26 accessibilityIgnoresInvertColors
27 style={{
28 width: iconSize,
29 height: iconSize,
30 borderRadius: compact ? 10 : 14,
31 }}
32 />
33 <View className="gap-1">
34 <View className="flex-row items-center gap-2">
35 <Text className="text-lg font-t3-bold tracking-[-0.4px] text-foreground">T3 Code</Text>
36 <View className="rounded-full bg-subtle px-2 py-1">
37 <Text className="text-3xs font-t3-bold tracking-[1.1px] uppercase text-foreground-muted">
38 {stageLabel}
39 </Text>
40 </View>
41 </View>
42 {!compact ? (
43 <Text className="text-xs font-medium text-foreground-muted">
44 Mobile control surface for your live coding environments
45 </Text>
46 ) : null}
47 </View>
48 </View>
49 );
50}