Open History to see the last commit
1import type { SubagentPillSegment } from "@t3tools/client-runtime/state/thread-subagents";
2import { formatDuration } from "@t3tools/shared/orchestrationTiming";
3import { GlassContainer, GlassView } from "expo-glass-effect";
4import { type ReactNode, useEffect, useRef, useState } from "react";
5import {
6 type LayoutChangeEvent,
7 Pressable,
8 Text as SystemText,
9 useWindowDimensions,
10 View,
11} from "react-native";
12import Animated, {
13 Easing,
14 FadeIn,
15 FadeOut,
16 ReduceMotion,
17 type SharedValue,
18 useAnimatedStyle,
19 useReducedMotion,
20 useSharedValue,
21 withTiming,
22} from "react-native-reanimated";
23import { withUniwind } from "uniwind";
24
25import { AppActivityIndicator } from "../../components/ui/AppActivityIndicator";
26import { AppText as Text } from "../../components/ui/AppText";
27import { SymbolView } from "../../components/ui/AppSymbol";
28import { ControlPill } from "../../components/ui/ControlPill";
29import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../native/native-glass";
30import { BrowserPreviewButton } from "../browser/browser-preview-button";
31import { DevicePreviewButton } from "../devices/device-preview-button";
32import type { FloatingWorkingStatus } from "./floating-working-status";
33import { ShimmeringWorkContent } from "./thread-work-log";
34import { useVisibleSecondClock } from "./use-visible-second-clock";
35
36const CONTROL_HEIGHT = 38.5;
37const CONTROL_GAP = 8;
38const COMPOSER_CAPSULE_INSET = 6;
39const GLASS_MERGE_SPACING = 12;
40const CONTROL_ENTERING = FadeIn.duration(180).reduceMotion(ReduceMotion.System);
41const CONTROL_EXITING = FadeOut.duration(120).reduceMotion(ReduceMotion.System);
42const CONTROL_TIMING = {
43 duration: 240,
44 easing: Easing.out(Easing.cubic),
45 reduceMotion: ReduceMotion.System,
46} as const;
47const CONTROL_ROW_GAP = 14;
48const CONTROL_SEPARATION = (CONTROL_ROW_GAP + CONTROL_HEIGHT) / 2;
49const LABEL_ENTERING = FadeIn.duration(160).delay(80).reduceMotion(ReduceMotion.System);
50const LABEL_EXITING = FadeOut.duration(100).reduceMotion(ReduceMotion.System);
51
52// Expo reapplies glass after layout or reattachment, restoring material UIKit can lose behind visible labels.
53const UniwindGlassView = withUniwind(GlassView, {
54 style: { fromClassName: "className" },
55});
56const UniwindGlassContainer = withUniwind(GlassContainer, {
57 style: { fromClassName: "className" },
58});
59const AnimatedGlassView = Animated.createAnimatedComponent(UniwindGlassView);
60
61// Segment widths feed back into labelWidth; ignore sub-point changes to avoid rounding-driven ellipsis loops.
62function settleWidth(next: number) {
63 return (current: number) => (Math.abs(current - next) < 1 ? current : next);
64}
65
66const CONTROL_OVERLAY_OFFSET = CONTROL_HEIGHT + CONTROL_GAP - COMPOSER_CAPSULE_INSET;
67export const FLOATING_WORKING_CONTROL_COVERAGE = CONTROL_OVERLAY_OFFSET + CONTROL_GAP;
68
69export function FloatingWorkingControl(props: {
70 readonly colorScheme: "light" | "dark";
71 readonly status: FloatingWorkingStatus | null;
72 readonly devicePreview: { readonly count: number; readonly onPress: () => void } | null;
73 readonly browserPreview: { readonly count: number; readonly onPress: () => void } | null;
74 readonly showScrollToEnd: boolean;
75 readonly onScrollToEnd: () => void;
76 readonly agents: SubagentPillSegment | null;
77 readonly onOpenAgents: () => void;
78 readonly queuedCount: number;
79 readonly onOpenQueue: () => void;
80 readonly lift?: SharedValue<number>;
81}) {
82 const { width: windowWidth } = useWindowDimensions();
83 const reducedMotion = useReducedMotion();
84 const [overlayWidth, setOverlayWidth] = useState(windowWidth);
85 const [queueWidth, setQueueWidth] = useState(0);
86 const [actionWidth, setActionWidth] = useState(0);
87 const action =
88 props.status?.kind === "background" ||
89 props.status?.kind === "lifecycle" ||
90 props.status?.kind === "stop"
91 ? props.status.action
92 : null;
93 const [agentsWidth, setAgentsWidth] = useState(0);
94 const hasQueue = props.queuedCount > 0;
95 const hasPreview = props.devicePreview !== null || props.browserPreview !== null;
96 const [previewWidth, setPreviewWidth] = useState(0);
97 const agents = props.agents;
98 const hasAgents = agents !== null;
99 const labelWidth = Math.max(
100 0,
101 Math.min(overlayWidth, windowWidth) -
102 CONTROL_HEIGHT -
103 32 -
104 (action !== null ? actionWidth : 0) -
105 (hasQueue ? queueWidth : 0) -
106 (hasAgents ? agentsWidth : 0) -
107 (hasPreview ? previewWidth : 0),
108 );
109 const separationProgress = useSharedValue(props.showScrollToEnd ? 1 : 0);
110
111 // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- animates the Reanimated separation value when scroll-to-end visibility changes
112 useEffect(() => {
113 separationProgress.set(withTiming(props.showScrollToEnd ? 1 : 0, CONTROL_TIMING));
114 }, [props.showScrollToEnd, separationProgress]);
115
116 const lift = props.lift;
117 const liftStyle = useAnimatedStyle(() => ({
118 transform: [{ translateY: -(lift?.value ?? 0) }],
119 }));
120 const arrowTransformStyle = useAnimatedStyle(() => ({
121 transform: [{ translateX: -CONTROL_SEPARATION * (1 - separationProgress.value) }],
122 }));
123 const arrowContentStyle = useAnimatedStyle(() => ({
124 opacity: separationProgress.value,
125 }));
126
127 // Animate an in-flow sizer for native glass layout. Measure labels at fixed width to avoid repeated animation retargeting.
128 const capsuleWidth = useSharedValue<number | null>(null);
129 const measuredWidthRef = useRef<number | null>(null);
130 const handleLabelLayout = (event: LayoutChangeEvent) => {
131 const width = event.nativeEvent.layout.width;
132 if (width === measuredWidthRef.current) {
133 return;
134 }
135 const first = measuredWidthRef.current === null;
136 measuredWidthRef.current = width;
137 capsuleWidth.set(first ? width : withTiming(width, CONTROL_TIMING));
138 };
139 const hasStatus = props.status !== null;
140 const hasCapsule = hasStatus || hasQueue || hasAgents || hasPreview;
141 // oxlint-disable-next-line t3code/no-unreasoned-state-sync -- clears the Reanimated capsule width value and measured width when the status goes away
142 useEffect(() => {
143 if (!hasStatus) {
144 measuredWidthRef.current = null;
145 capsuleWidth.set(null);
146 }
147 }, [capsuleWidth, hasStatus]);
148 const capsuleStyle = useAnimatedStyle(() => ({
149 transform: [{ translateX: CONTROL_SEPARATION * (1 - separationProgress.value) }],
150 }));
151 const capsuleSizerStyle = useAnimatedStyle(() => ({
152 width: capsuleWidth.value ?? 0,
153 }));
154
155 if (!hasCapsule && !props.showScrollToEnd) {
156 return null;
157 }
158
159 const previewCompact =
160 hasStatus ||
161 hasAgents ||
162 hasQueue ||
163 (props.devicePreview !== null && props.browserPreview !== null);
164 const statusInteractive =
165 props.status?.kind === "connection" ||
166 props.status?.kind === "child-input" ||
167 props.status?.kind === "background";
168 const capsuleInteractive =
169 statusInteractive || action !== null || hasQueue || hasAgents || hasPreview;
170 const statusContent =
171 props.status !== null ? (
172 <View
173 pointerEvents={statusInteractive ? "box-none" : "none"}
174 className="h-11 items-center justify-center"
175 >
176 <Animated.View className="h-11" style={capsuleSizerStyle} />
177 <View
178 pointerEvents={statusInteractive ? "box-none" : "none"}
179 className="absolute h-11 items-center justify-center"
180 style={{ width: labelWidth }}
181 >
182 <FloatingStatusLabel
183 key={
184 props.status.kind === "working" || props.status.kind === "compacting"
185 ? props.status.kind
186 : `${props.status.kind}:${props.status.label}`
187 }
188 status={props.status}
189 onLayout={handleLabelLayout}
190 />
191 </View>
192 </View>
193 ) : null;
194
195 const capsuleContent = (
196 <View className="flex-row items-center">
197 {statusContent}
198 {action !== null ? (
199 <View
200 onLayout={(event) => setActionWidth(settleWidth(event.nativeEvent.layout.width))}
201 className="h-11 flex-row items-center"
202 >
203 <View className="h-4 w-px bg-border" />
204 <Pressable
205 accessibilityRole="button"
206 accessibilityLabel={action.accessibilityLabel}
207 accessibilityState={{ disabled: action.disabled }}
208 disabled={action.disabled}
209 onPress={action.onPress}
210 className={`h-11 items-center justify-center px-3 active:opacity-70 ${action.disabled ? "opacity-50" : ""}`}
211 >
212 <Text className="font-t3-medium text-xs text-foreground" numberOfLines={1}>
213 {action.label}
214 </Text>
215 </Pressable>
216 </View>
217 ) : null}
218 {hasPreview ? (
219 <View
220 className="h-11 flex-row items-center"
221 onLayout={(event) => setPreviewWidth(settleWidth(event.nativeEvent.layout.width))}
222 >
223 {hasStatus ? <View className="h-4 w-px bg-border" /> : null}
224 {props.devicePreview !== null ? (
225 <DevicePreviewButton {...props.devicePreview} compact={previewCompact} />
226 ) : null}
227 {props.browserPreview !== null ? (
228 <BrowserPreviewButton {...props.browserPreview} compact={previewCompact} />
229 ) : null}
230 </View>
231 ) : null}
232 {agents !== null ? (
233 <Pressable
234 accessibilityRole="button"
235 accessibilityLabel={`Open agents, ${agents.accessibilityLabel}`}
236 accessibilityHint="Opens this turn's subagents"
237 onPress={props.onOpenAgents}
238 onLayout={(event) => setAgentsWidth(settleWidth(event.nativeEvent.layout.width))}
239 className="h-11 flex-row items-center gap-1.5 px-3 active:opacity-70"
240 >
241 {hasStatus || hasPreview ? <View className="absolute left-0 h-4 w-px bg-border" /> : null}
242 <SymbolView name="person.2" size={13} tintColorClassName="accent-foreground-muted" />
243 <Text className="font-t3-medium text-xs tabular-nums" numberOfLines={1}>
244 {agents.label}
245 </Text>
246 </Pressable>
247 ) : null}
248 {hasQueue ? (
249 <Pressable
250 accessibilityRole="button"
251 accessibilityLabel={`Open queue, ${props.queuedCount} messages`}
252 accessibilityHint="Opens queued messages to send now, edit, or remove"
253 onPress={props.onOpenQueue}
254 onLayout={(event) => setQueueWidth(settleWidth(event.nativeEvent.layout.width))}
255 style={{ maxWidth: Math.min(overlayWidth, windowWidth) * 0.45 }}
256 className="h-11 flex-row items-center gap-2 px-3 active:opacity-70"
257 >
258 {hasStatus || hasPreview || hasAgents ? (
259 <View className="absolute left-0 h-4 w-px bg-border" />
260 ) : null}
261 <SymbolView name="list.number" size={13} tintColorClassName="accent-foreground-muted" />
262 <Text className="shrink font-t3-medium text-xs tabular-nums" numberOfLines={1}>
263 {props.queuedCount} queued
264 </Text>
265 </Pressable>
266 ) : null}
267 </View>
268 );
269
270 return (
271 <Animated.View
272 pointerEvents="box-none"
273 className="absolute left-0 right-0 z-20 items-center"
274 style={[{ top: -CONTROL_OVERLAY_OFFSET }, liftStyle]}
275 onLayout={(event) => setOverlayWidth(event.nativeEvent.layout.width)}
276 entering={NATIVE_LIQUID_GLASS_SUPPORTED || reducedMotion ? undefined : CONTROL_ENTERING}
277 exiting={NATIVE_LIQUID_GLASS_SUPPORTED || reducedMotion ? undefined : CONTROL_EXITING}
278 >
279 {hasCapsule && NATIVE_LIQUID_GLASS_SUPPORTED ? (
280 <UniwindGlassContainer
281 spacing={GLASS_MERGE_SPACING}
282 pointerEvents="box-none"
283 className="flex-row items-center gap-4"
284 >
285 <AnimatedGlassView
286 colorScheme={props.colorScheme}
287 glassEffectStyle="regular"
288 isInteractive={capsuleInteractive}
289 pointerEvents={capsuleInteractive ? "box-none" : "none"}
290 className="h-11 items-center justify-center overflow-hidden rounded-full"
291 style={capsuleStyle}
292 >
293 {capsuleContent}
294 </AnimatedGlassView>
295
296 <AnimatedGlassView
297 colorScheme={props.colorScheme}
298 glassEffectStyle={{ style: props.showScrollToEnd ? "regular" : "none", animate: true }}
299 isInteractive
300 pointerEvents={props.showScrollToEnd ? "auto" : "none"}
301 accessibilityElementsHidden={!props.showScrollToEnd}
302 importantForAccessibility={props.showScrollToEnd ? "auto" : "no-hide-descendants"}
303 className="h-11 w-11 items-center justify-center overflow-hidden rounded-full"
304 style={arrowTransformStyle}
305 >
306 <Animated.View style={arrowContentStyle}>
307 <ScrollToEndButton disabled={!props.showScrollToEnd} onPress={props.onScrollToEnd} />
308 </Animated.View>
309 </AnimatedGlassView>
310 </UniwindGlassContainer>
311 ) : hasCapsule ? (
312 <View pointerEvents="box-none" className="flex-row items-center gap-4">
313 <Animated.View
314 pointerEvents={capsuleInteractive ? "box-none" : "none"}
315 className="h-11 items-center justify-center overflow-hidden rounded-full border border-border bg-glass-fallback shadow-md shadow-black/10"
316 style={capsuleStyle}
317 >
318 {capsuleContent}
319 </Animated.View>
320
321 <Animated.View
322 pointerEvents={props.showScrollToEnd ? "auto" : "none"}
323 accessibilityElementsHidden={!props.showScrollToEnd}
324 importantForAccessibility={props.showScrollToEnd ? "auto" : "no-hide-descendants"}
325 style={[arrowTransformStyle, arrowContentStyle]}
326 >
327 <ControlPill
328 accessibilityLabel="Scroll to end"
329 activateOnPressIn
330 className="h-11 w-11 border border-border bg-glass-fallback shadow-md shadow-black/10"
331 disabled={!props.showScrollToEnd}
332 icon={{ ios: "chevron.down", android: "keyboard_arrow_down" }}
333 onPress={props.onScrollToEnd}
334 />
335 </Animated.View>
336 </View>
337 ) : NATIVE_LIQUID_GLASS_SUPPORTED ? (
338 <UniwindGlassView
339 colorScheme={props.colorScheme}
340 glassEffectStyle="regular"
341 isInteractive
342 className="h-11 w-11 items-center justify-center overflow-hidden rounded-full"
343 >
344 <ScrollToEndButton onPress={props.onScrollToEnd} />
345 </UniwindGlassView>
346 ) : (
347 <ControlPill
348 accessibilityLabel="Scroll to end"
349 activateOnPressIn
350 className="h-11 w-11 border border-border bg-glass-fallback shadow-md shadow-black/10"
351 icon={{ ios: "chevron.down", android: "keyboard_arrow_down" }}
352 onPress={props.onScrollToEnd}
353 />
354 )}
355 </Animated.View>
356 );
357}
358
359function CompactingLabel(props: { readonly onLayout: (event: LayoutChangeEvent) => void }) {
360 return (
361 <StatusLabelRow accessibilityLabel="Compacting" className="gap-1.5" onLayout={props.onLayout}>
362 <SymbolView
363 name="arrow.down.right.and.arrow.up.left"
364 size={13}
365 tintColorClassName="foreground"
366 type="monochrome"
367 />
368 <Text className="font-t3-medium text-xs text-foreground">Compacting…</Text>
369 </StatusLabelRow>
370 );
371}
372
373function FloatingStatusLabel(props: {
374 readonly status: FloatingWorkingStatus;
375 readonly onLayout: (event: LayoutChangeEvent) => void;
376}) {
377 if (props.status.kind === "syncing") {
378 return (
379 <StatusLabelRow
380 key="syncing"
381 accessibilityLabel={props.status.label}
382 className="gap-2"
383 onLayout={props.onLayout}
384 >
385 <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
386 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
387 {props.status.label}
388 </Text>
389 </StatusLabelRow>
390 );
391 }
392 if (props.status.kind === "compacting") {
393 return <CompactingLabel key="compacting" onLayout={props.onLayout} />;
394 }
395 if (props.status.kind === "child-input") {
396 return (
397 <StatusLabelRow
398 key="child-input"
399 accessibilityLabel={props.status.accessibilityLabel}
400 accessibilityRole="button"
401 className="gap-2"
402 onLayout={props.onLayout}
403 onPress={props.status.onPress}
404 >
405 <SymbolView name="text.bubble" size={13} tintColorClassName="foreground" />
406 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
407 {props.status.label}
408 </Text>
409 </StatusLabelRow>
410 );
411 }
412 if (props.status.kind === "connection") {
413 return (
414 <StatusLabelRow
415 key="connection"
416 accessibilityLabel={props.status.label}
417 accessibilityRole="button"
418 className="gap-2"
419 onLayout={props.onLayout}
420 onPress={props.status.onPress}
421 >
422 {props.status.tone === "reconnecting" ? (
423 <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
424 ) : (
425 <View className="h-2 w-2 rounded-full bg-red-500" />
426 )}
427 <Text
428 className="max-w-[260px] shrink font-t3-medium text-xs text-foreground"
429 numberOfLines={1}
430 >
431 {props.status.label}
432 </Text>
433 </StatusLabelRow>
434 );
435 }
436 if (props.status.kind === "lifecycle") {
437 return (
438 <StatusLabelRow
439 key="lifecycle"
440 accessibilityLabel={props.status.label}
441 className="gap-2"
442 onLayout={props.onLayout}
443 >
444 <SymbolView
445 name={props.status.state === "settled" ? "checkmark.circle" : "clock"}
446 size={13}
447 tintColorClassName="foreground"
448 type="monochrome"
449 />
450 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
451 {props.status.label}
452 </Text>
453 </StatusLabelRow>
454 );
455 }
456 if (props.status.kind === "background") {
457 return (
458 <StatusLabelRow
459 key="background"
460 accessibilityLabel={props.status.accessibilityLabel}
461 accessibilityRole="button"
462 onPress={props.status.onPress}
463 className="gap-2"
464 onLayout={props.onLayout}
465 >
466 <SymbolView
467 name={props.status.waiting ? "person.2" : "terminal"}
468 size={13}
469 tintColorClassName="foreground"
470 type="monochrome"
471 />
472 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
473 {props.status.label}
474 </Text>
475 </StatusLabelRow>
476 );
477 }
478 if (props.status.kind === "stop") {
479 return (
480 <StatusLabelRow
481 key="stop"
482 accessibilityLabel={props.status.label}
483 className="gap-2"
484 onLayout={props.onLayout}
485 >
486 {props.status.unresponsive ? (
487 <SymbolView
488 name="exclamationmark.triangle"
489 size={13}
490 tintColorClassName="accent-warning-foreground"
491 type="monochrome"
492 />
493 ) : (
494 <AppActivityIndicator size="small" colorClassName="accent-icon-muted" />
495 )}
496 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
497 {props.status.label}
498 </Text>
499 </StatusLabelRow>
500 );
501 }
502 if (props.status.kind === "goal") {
503 return (
504 <StatusLabelRow
505 key="goal"
506 accessibilityLabel={props.status.accessibilityLabel}
507 className="gap-2"
508 onLayout={props.onLayout}
509 >
510 <SymbolView name="target" size={13} tintColorClassName="foreground" type="monochrome" />
511 <Text className="shrink font-t3-medium text-xs text-foreground" numberOfLines={1}>
512 {props.status.label}
513 </Text>
514 </StatusLabelRow>
515 );
516 }
517 if (props.status.kind === "preparing") {
518 return (
519 <StatusLabelRow
520 key="preparing"
521 accessibilityLabel={props.status.label}
522 className="gap-1.5"
523 onLayout={props.onLayout}
524 >
525 <SymbolView
526 name="arrow.triangle.branch"
527 size={13}
528 tintColorClassName="foreground"
529 type="monochrome"
530 />
531 <ShimmeringWorkContent
532 className="flex-none"
533 textClassName="font-t3-medium"
534 compact
535 icon="arrow.triangle.branch"
536 iconSubtleColor="transparent"
537 label={props.status.label}
538 showIcon={false}
539 />
540 </StatusLabelRow>
541 );
542 }
543 return (
544 <WorkingDuration key="working" startedAt={props.status.startedAt} onLayout={props.onLayout} />
545 );
546}
547
548function StatusLabelRow(props: {
549 readonly accessibilityLabel?: string;
550 readonly accessibilityRole?: "button";
551 readonly className?: string;
552 readonly children: ReactNode;
553 readonly onLayout: (event: LayoutChangeEvent) => void;
554 readonly onPress?: () => void;
555}) {
556 const reducedMotion = useReducedMotion();
557 const rowClassName = `h-11 flex-row items-center px-4 ${props.className ?? ""}`;
558 return (
559 <Animated.View
560 className="absolute max-w-full"
561 entering={reducedMotion ? undefined : LABEL_ENTERING}
562 exiting={reducedMotion ? undefined : LABEL_EXITING}
563 onLayout={props.onLayout}
564 >
565 {props.onPress ? (
566 <Pressable
567 accessibilityLabel={props.accessibilityLabel}
568 accessibilityRole={props.accessibilityRole}
569 className={`${rowClassName} active:opacity-70`}
570 onPress={props.onPress}
571 >
572 {props.children}
573 </Pressable>
574 ) : (
575 <View accessible accessibilityLabel={props.accessibilityLabel} className={rowClassName}>
576 {props.children}
577 </View>
578 )}
579 </Animated.View>
580 );
581}
582
583function WorkingDuration(props: {
584 readonly startedAt: string;
585 readonly onLayout: (event: LayoutChangeEvent) => void;
586}) {
587 return (
588 <StatusLabelRow onLayout={props.onLayout}>
589 <WorkingTimer startedAt={props.startedAt} />
590 </StatusLabelRow>
591 );
592}
593
594function WorkingTimer(props: { readonly startedAt: string }) {
595 const nowMs = useVisibleSecondClock(true);
596 return (
597 <SystemText
598 className="shrink text-xs text-foreground"
599 numberOfLines={1}
600 style={{ fontVariant: ["tabular-nums"], fontWeight: "500" }}
601 >
602 Working {formatWorkingDuration(props.startedAt, nowMs)}
603 </SystemText>
604 );
605}
606
607function formatWorkingDuration(startedAt: string, nowMs: number): string {
608 const startedAtMs = Date.parse(startedAt);
609 if (!Number.isFinite(startedAtMs) || nowMs <= startedAtMs) {
610 return "0s";
611 }
612
613 const totalSeconds = Math.floor((nowMs - startedAtMs) / 1_000);
614 if (totalSeconds < 60) {
615 return `${totalSeconds}s`;
616 }
617 if (totalSeconds >= 3_600) {
618 return formatDuration(totalSeconds * 1_000);
619 }
620
621 const minutes = Math.floor(totalSeconds / 60);
622 const seconds = String(totalSeconds % 60).padStart(2, "0");
623 return `${minutes}m ${seconds}s`;
624}
625
626function ScrollToEndButton(props: { readonly disabled?: boolean; readonly onPress: () => void }) {
627 return (
628 <ControlPill
629 accessibilityLabel="Scroll to end"
630 activateOnPressIn
631 className="h-11 w-11 bg-transparent"
632 disabled={props.disabled}
633 icon={{ ios: "chevron.down", android: "keyboard_arrow_down" }}
634 onPress={props.onPress}
635 />
636 );
637}