Skip to content

Commit 046a695

Browse files
Redesigned internal automation page breadcrumb
1 parent fd14e2b commit 046a695

File tree

2 files changed

+21
-30
lines changed

2 files changed

+21
-30
lines changed
File renamed without changes.

src/components/global/bread-crumbs/automations/index.tsx

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,56 +13,47 @@ type Props = {
1313

1414
const AutomationsBreadCrumb = ({ id }: Props) => {
1515
const { data } = useQueryAutomation(id);
16-
1716
const { edit, enableEdit, inputRef, isPending } = useEditAutomation(id);
18-
1917
const { latestVariable } = useMutationDataState(["update-automation"]);
2018

2119
return (
22-
<div className="rounded-full w-full p-5 mr-10 bg-[#18181B1A] flex items-center">
20+
<div className="relative w-full px-6 py-4 bg-white border border-gray-200 rounded-xl shadow-md flex items-center gap-x-4 backdrop-filter backdrop-blur-sm">
2321
<div className="flex items-center gap-x-3 min-w-0">
24-
<p className="text-[#9B9CA0] truncate">Automations</p>
25-
<ChevronRight className="flex-shrink-0" color="#9B9CA0" />
26-
<span className="flex gap-x-3 items-center min-w-0">
22+
<p className="text-gray-500 font-medium hover:text-gray-700 transition-colors cursor-pointer">Automations</p>
23+
<ChevronRight className="flex-shrink-0 w-4 h-4" color="#6B7280" />
24+
<div className="flex items-center gap-x-2 min-w-0">
2725
{edit ? (
2826
<Input
2927
ref={inputRef}
30-
placeholder={
31-
isPending ? latestVariable.variables : "Add a new name"
32-
}
33-
className="bg-transparent h-auto outline-none text-base border-none p-0 text-black"
28+
placeholder={isPending ? latestVariable.variables : "Add a new name"}
29+
className="bg-transparent h-auto text-base font-medium border-none p-0 focus:ring-2 focus:ring-blue-500/20 rounded transition-all"
3430
/>
3531
) : (
36-
<p className="text-[#9B9CA0] truncate">
37-
{latestVariable?.variables
38-
? latestVariable?.variables.name
39-
: data?.data?.name}
32+
<p className="text-gray-900 font-medium truncate hover:text-blue-600 transition-colors cursor-default">
33+
{latestVariable?.variables ? latestVariable.variables.name : data?.data?.name}
4034
</p>
4135
)}
42-
{edit ? (
43-
<></>
44-
) : (
45-
<span
46-
className="cursor-pointer hover:opacity-75 duration-100 transition flex-shrink-0 mr-4"
36+
{!edit && (
37+
<button
4738
onClick={enableEdit}
39+
className="p-1.5 rounded-full hover:bg-gray-100 transition-colors group"
4840
>
49-
<PencilIcon size={14} color="#000000" />
50-
</span>
41+
<PencilIcon size={14} className="text-gray-400 group-hover:text-gray-600" />
42+
</button>
5143
)}
52-
</span>
44+
</div>
5345
</div>
5446

55-
<div className="flex items-center gap-x-5 ml-auto">
56-
<p className="hidden md:block text-text-secondary/60 text-sm truncate min-w-0">
57-
All states are automatically saved
58-
</p>
59-
<div className="flex gap-x-5 flex-shrink-0">
60-
<p className="text-text-secondary text-sm truncate min-w-0">
61-
Changes Saved
47+
<div className="flex items-center gap-x-6 ml-auto">
48+
<div className="hidden md:flex items-center gap-x-2">
49+
<div className="w-2 h-2 bg-green-500 rounded-full animate-pulse" />
50+
<p className="text-gray-500 text-sm font-medium">
51+
All changes auto-saved
6252
</p>
6353
</div>
54+
<div className="h-6 w-px bg-gray-200" />
55+
<ActivateAutomationButton id={id} />
6456
</div>
65-
<ActivateAutomationButton id={id} />
6657
</div>
6758
);
6859
};

0 commit comments

Comments
 (0)