Skip to content

Commit 399af7f

Browse files
authored
feat(onboarding): split git connect and repo select into separate steps (#2389)
1 parent 36ab02d commit 399af7f

12 files changed

Lines changed: 1365 additions & 1156 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import { CheckCircle, CircleNotch } from "@phosphor-icons/react";
2+
import { Box, Flex, Text } from "@radix-ui/themes";
3+
import type { ReactNode } from "react";
4+
import { PANEL_SHADOW } from "./onboardingStyles";
5+
6+
interface CliCheckPanelProps {
7+
icon: ReactNode;
8+
title: string;
9+
isLoading: boolean;
10+
statusBadge: ReactNode | null;
11+
children?: ReactNode;
12+
}
13+
14+
export function CliCheckPanel({
15+
icon,
16+
title,
17+
isLoading,
18+
statusBadge,
19+
children,
20+
}: CliCheckPanelProps) {
21+
return (
22+
<Box
23+
p="5"
24+
style={{ boxShadow: PANEL_SHADOW }}
25+
className="rounded-[12px] border border-(--gray-a3) bg-(--color-panel-solid)"
26+
>
27+
<Flex direction="column" gap="3">
28+
<Flex align="center" justify="between">
29+
<Flex align="center" gap="2">
30+
{icon}
31+
<Text className="font-bold text-(--gray-12) text-base">
32+
{title}
33+
</Text>
34+
</Flex>
35+
{isLoading ? (
36+
<CircleNotch size={14} className="animate-spin text-(--gray-9)" />
37+
) : (
38+
statusBadge
39+
)}
40+
</Flex>
41+
{children}
42+
</Flex>
43+
</Box>
44+
);
45+
}
46+
47+
interface InstalledBadgeProps {
48+
label: string;
49+
}
50+
51+
export function InstalledBadge({ label }: InstalledBadgeProps) {
52+
return (
53+
<Flex align="center" gap="1">
54+
<CheckCircle size={14} weight="fill" className="text-(--green-9)" />
55+
<Text className="text-(--green-11) text-[13px]">{label}</Text>
56+
</Flex>
57+
);
58+
}

0 commit comments

Comments
 (0)