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

WorkspaceEmptyDetail.tsx

40 lines1.5 KB

1import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
2import { SymbolView } from "../../components/AppSymbol";
3import { Pressable, View } from "react-native";
4​
5import { AppText as Text } from "../../components/AppText";
6​
7export function WorkspaceEmptyDetail(props: { readonly onStartNewTask?: () => void }) {
8 const { materialYouStyleLayoutActive } = useAppearancePreferences();
9 return (
10 <View
11 className={
12 materialYouStyleLayoutActive
13 ? "flex-1 items-center justify-center px-10"
14 : "flex-1 items-center justify-center bg-screen px-10"
15 }
16 >
17 <View className="max-w-[360px] items-center gap-3">
18 <SymbolView
19 name="sidebar.left"
20 size={34}
21 tintColorClassName={"accent-icon-subtle"}
22 type="hierarchical"
23 />
24 <Text className="text-center text-xl font-t3-bold">Select a thread</Text>
25 <Text className="text-center text-base text-foreground-muted">
26 Choose a thread from the sidebar or start a new task.
27 </Text>
28 {props.onStartNewTask ? (
29 <Pressable
30 accessibilityRole="button"
31 className="mt-2 flex-row items-center gap-2 rounded-full bg-primary px-5 py-3 active:opacity-70"
32 onPress={props.onStartNewTask}
33 >
34 <Text className="text-base font-t3-bold text-primary-foreground">New Task</Text>
35 </Pressable>
36 ) : null}
37 </View>
38 </View>
39 );