Open History to see the last commit
1import type { ComponentProps } from "react";
2import { FloatingActionButton } from "./ui/FloatingActionButton.android";
3import { ScrollComposeButton } from "./ScrollComposeButton.android";
4import type { NewThreadButton as SharedNewThreadButton } from "./NewThreadButton.shared";
5
6export function NewThreadButton(props: ComponentProps<typeof SharedNewThreadButton>) {
7 if (props.extended && props.expanded !== undefined) {
8 return <ScrollComposeButton {...props} expanded={props.expanded} />;
9 }
10 return (
11 <FloatingActionButton
12 {...props}
13 icon="square.and.pencil"
14 label="New thread"
15 tone="primary"
16 variant={props.extended ? "extended" : "large"}
17 />
18 );
19}