import { Button, Host, HStack, ScrollView } from '@expo/ui/swift-ui'; import { accessibilityLabel, buttonBorderShape, buttonStyle, controlSize, disabled as disabledModifier, foregroundStyle, labelStyle, padding, tint, } from '@expo/ui/swift-ui/modifiers'; import { StyleSheet, View } from 'react-native'; import { useSafeAreaInsets } from 'react-native-safe-area-context'; import { KEYS } from './keys'; import { IOS } from './theme'; import type { KeyRowProps } from './types'; // Key caps in the keyboard's own colors, so the row reads as part of the keyboard. export function KeyRow({ scheme, editor, selectMode, onToggleSelect, canUndo, canRedo, }: KeyRowProps) { const palette = IOS[scheme]; const safe = useSafeAreaInsets(); const cap = (on: boolean) => [ buttonStyle(on ? 'borderedProminent' : 'bordered'), buttonBorderShape('roundedRectangle', 8), controlSize('regular'), tint(on ? palette.label : palette.key), foregroundStyle(on ? palette.systemBackground : palette.keyText), ]; return (