mirror of
https://github.com/stablyai/orca.git
synced 2026-09-26 16:02:43 +00:00
* fix(mobile): keep support modules out of Expo routes * test(mobile): parse Expo route exports * test(mobile): reject platform-specific API routes * test(mobile): reject platform API routes unconditionally
40 lines
947 B
TypeScript
40 lines
947 B
TypeScript
import type { ComponentType } from 'react'
|
|
import { Pressable } from 'react-native'
|
|
import { colors } from '../theme/mobile-theme'
|
|
import { styles } from './mobile-session-styles'
|
|
|
|
type HeaderIconProps = {
|
|
size?: number
|
|
color?: string
|
|
strokeWidth?: number
|
|
}
|
|
|
|
type MobileSessionHeaderIconButtonProps = {
|
|
active?: boolean
|
|
accessibilityLabel: string
|
|
icon: ComponentType<HeaderIconProps>
|
|
onPress: () => void
|
|
}
|
|
|
|
export function MobileSessionHeaderIconButton({
|
|
active = false,
|
|
accessibilityLabel,
|
|
icon: Icon,
|
|
onPress
|
|
}: MobileSessionHeaderIconButtonProps) {
|
|
return (
|
|
<Pressable
|
|
style={({ pressed }) => [
|
|
styles.filesButton,
|
|
pressed && styles.filesButtonPressed,
|
|
active && styles.filesButtonActive
|
|
]}
|
|
onPress={onPress}
|
|
hitSlop={8}
|
|
accessibilityLabel={accessibilityLabel}
|
|
>
|
|
<Icon size={18} color={colors.textSecondary} strokeWidth={2.1} />
|
|
</Pressable>
|
|
)
|
|
}
|