The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { useGT } from "gt-react-native"; |
| 2 | import type { ComponentProps } from "react"; |
| 3 | import { FloatingActionButton } from "./ui/FloatingActionButton.android"; |
| 4 | import { ScrollComposeButton } from "./ScrollComposeButton.android"; |
| 5 | import type { NewThreadButton as SharedNewThreadButton } from "./NewThreadButton.shared"; |
| 6 | |
| 7 | export function NewThreadButton(props: ComponentProps<typeof SharedNewThreadButton>) { |
| 8 | const gt = useGT(); |
| 9 | if (props.extended && props.expanded !== undefined) { |
| 10 | return <ScrollComposeButton {...props} expanded={props.expanded} />; |
| 11 | } |
| 12 | return ( |
| 13 | <FloatingActionButton |
| 14 | {...props} |
| 15 | icon="square.and.pencil" |
| 16 | label={gt("New thread")} |
| 17 | tone="primary" |
| 18 | variant={props.extended ? "extended" : "large"} |
| 19 | /> |
| 20 | ); |
| 21 | } |