Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

guestMessageStyle.tsx

32 lines1.1 KB

1import { useGT } from "gt-react-native";
2import { View } from "react-native";
3​
4import { AppText as Text } from "../../components/ui/AppText";
5​
6/** The guest's name above their message, where "Sent by T3 Code" sits for server messages. */
7export function GuestMessageName(props: { readonly name: string }) {
8 const gt = useGT();
9 return (
10 <Text
11 accessibilityLabel={gt("{name} (guest)", { name: props.name })}
12 className="mb-1 pr-1 font-t3-medium text-2xs text-adaptive-fuchsia-600-300"
13 numberOfLines={1}
14 >
15 {props.name}
16 </Text>
17 );
19​
20/**
21 * First child of a sent guest bubble. Over the bubble color it gives the web's 14% fuchsia mix,
22 * which every theme gets without a per-theme token.
23 */
24export function GuestBubbleTint() {
25 return (
26 <View pointerEvents="none" className="absolute inset-0 rounded-[20px] bg-fuchsia-500/14" />
27 );
29​
30/** A pending guest bubble has a dashed edge and no fill. */
31export const GUEST_PENDING_BUBBLE_CLASS_NAME =
32 "min-w-0 rounded-[20px] border border-dashed border-adaptive-fuchsia-500-a50-300-a40 bg-transparent px-3.5 py-2.5";