import { Pressable, Text } from "react-native"; import { Avatar, AvatarFallback } from "../ui/avatar"; import { ChevronDown } from "lucide-react-native"; export function HeaderRightButton({ title, onPress, showAvatar, }: { title: string; onPress?(): void; showAvatar?: boolean; }) { const initials = title .split(" ") .map((word) => word[0]) .join("") .slice(0, 2) .toUpperCase(); return ( <> {showAvatar && ( {initials} )} {title} ); }