Files
otunes/apps/mobile/components/add-button.tsx
T
joshuafhigginsandClaude Opus 5.5 1c22639527 feat(mobile): swipe actions for users in settings
Swipe a user left to make or remove admin, or delete them; both ask
for confirmation. The create account button is larger.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 10:25:34 -05:00

27 lines
631 B
TypeScript

import { Ionicons } from "@expo/vector-icons"
import { Pressable } from "react-native"
import { useThemeColors } from "@/lib/theme"
/** A plain "+" icon button. iOS uses a native SwiftUI button instead. */
export function AddButton({
label,
onPress,
}: {
label: string
onPress: () => void
}) {
const colors = useThemeColors()
return (
<Pressable
accessibilityRole="button"
accessibilityLabel={label}
hitSlop={8}
onPress={onPress}
style={({ pressed }) => ({ opacity: pressed ? 0.6 : 1 })}
>
<Ionicons name="add" size={32} color={colors.foreground} />
</Pressable>
)
}