Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

NewThreadButton.android.tsx

21 lines767 Bytes

1import { useGT } from "gt-react-native";
2import type { ComponentProps } from "react";
3import { FloatingActionButton } from "./ui/FloatingActionButton.android";
4import { ScrollComposeButton } from "./ScrollComposeButton.android";
5import type { NewThreadButton as SharedNewThreadButton } from "./NewThreadButton.shared";
6​
7export 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 );