11import { useAtomValue } from "@effect/atom-react" ;
22import type { EnvironmentId , OrchestrationV2Subagent } from "@t3tools/contracts" ;
33import { useState } from "react" ;
4- import { Alert , Pressable } from "react-native" ;
4+ import { Alert , Pressable , View } from "react-native" ;
55
66import { AppActivityIndicator } from "../../components/AppActivityIndicator" ;
77import { AppText as Text } from "../../components/AppText" ;
88import { SymbolView } from "../../components/AppSymbol" ;
9+ import { cn } from "../../lib/cn" ;
910import { orchestrationEnvironment } from "../../state/orchestration" ;
1011import { threadEnvironment } from "../../state/threads" ;
1112import { useAtomCommand } from "../../state/use-atom-command" ;
@@ -17,6 +18,7 @@ import {
1718export function SubagentStopButton ( props : {
1819 readonly environmentId : EnvironmentId ;
1920 readonly subagent : OrchestrationV2Subagent ;
21+ readonly className ?: string ;
2022} ) {
2123 const target = resolveSubagentStopTarget ( props . subagent ) ;
2224 const canStopWorkflow = useAtomValue (
@@ -72,14 +74,19 @@ export function SubagentStopButton(props: {
7274 accessibilityState = { { disabled : stopping , busy : stopping } }
7375 disabled = { stopping }
7476 onPress = { confirmStop }
75- className = "min-h-11 min-w-11 flex-row items-center justify-center gap-1.5 rounded-full bg-subtle px-3 active:opacity-70 disabled:opacity-50"
76- >
77- { stopping ? (
78- < AppActivityIndicator size = "small" />
79- ) : (
80- < SymbolView name = "stop.fill" size = { 10 } tintColorClassName = "accent-danger-foreground" />
77+ className = { cn (
78+ "min-h-11 justify-center active:opacity-70 disabled:opacity-50" ,
79+ props . className ,
8180 ) }
82- < Text className = "font-t3-medium text-xs text-danger-foreground" > Stop</ Text >
81+ >
82+ < View className = "h-7 flex-row items-center gap-1.5 rounded-full border border-danger-border bg-danger px-3" >
83+ { stopping ? (
84+ < AppActivityIndicator size = "small" />
85+ ) : (
86+ < SymbolView name = "stop.fill" size = { 9 } tintColorClassName = "accent-danger-foreground" />
87+ ) }
88+ < Text className = "font-t3-medium text-xs text-danger-foreground" > Stop</ Text >
89+ </ View >
8390 </ Pressable >
8491 ) ;
8592}
0 commit comments