import React from 'react'; import { Sheet } from '@tamagui/sheet'; import { YStack } from '@tamagui/stacks'; import { SizableText as Text } from '@tamagui/text'; import { Button } from '@tamagui/button'; import { useAppearance } from '@/hooks/use-appearance'; export type CompassAction = { key: string; label: string; icon?: React.ReactNode; onPress?: () => void; }; type CompassHubProps = { open: boolean; onOpenChange: (open: boolean) => void; quadrants: [CompassAction, CompassAction, CompassAction, CompassAction]; centerAction: CompassAction; title?: string; }; const quadrantPositions: Array<{ top?: number; right?: number; bottom?: number; left?: number; }> = [ { top: 0, left: 0 }, { top: 0, right: 0 }, { bottom: 0, left: 0 }, { bottom: 0, right: 0 }, ]; export default function CompassHub({ open, onOpenChange, quadrants, centerAction, title = 'Quick jump', }: CompassHubProps) { const close = () => onOpenChange(false); const { resolved } = useAppearance(); const isDark = resolved === 'dark'; if (!open) { return null; } return ( {title} {quadrants.map((action, index) => ( ))} Tap outside to close ); }