Skip to content

Commit 4374023

Browse files
committed
feat: navbar ui improvement
1 parent 99cbccf commit 4374023

2 files changed

Lines changed: 60 additions & 15 deletions

File tree

packages/imagekit-editor-dev/src/components/header/TemplatesDropdown.tsx

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,29 @@ export function TemplatesDropdown({
208208
>
209209
<PopoverTrigger>
210210
<Box
211+
as="button"
211212
display="inline-flex"
212213
alignItems="center"
214+
gap="2"
213215
cursor="pointer"
214-
borderRadius="md"
215-
p="1"
216-
_hover={{ bg: "editorGray.200" }}
216+
height="full"
217+
px="4"
218+
_hover={{ bg: "editorGray.100" }}
219+
transition="background-color 0.15s"
217220
aria-label="Open templates dropdown"
218221
>
222+
<Icon
223+
as={PiSquaresFourLight}
224+
boxSize={5}
225+
color="editorBattleshipGrey.600"
226+
/>
227+
<Text
228+
fontSize="sm"
229+
fontWeight="medium"
230+
color="editorBattleshipGrey.700"
231+
>
232+
Templates
233+
</Text>
219234
<Icon
220235
as={PiCaretDown}
221236
boxSize={4}

packages/imagekit-editor-dev/src/components/header/index.tsx

Lines changed: 42 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ import {
33
Divider,
44
Flex,
55
Icon,
6+
IconButton,
67
Menu,
78
MenuButton,
89
MenuItem,
910
MenuList,
1011
Spacer,
1112
} from "@chakra-ui/react"
13+
import { PiGear } from "@react-icons/all-files/pi/PiGear"
1214
import { PiGlobe } from "@react-icons/all-files/pi/PiGlobe"
1315
import { PiLock } from "@react-icons/all-files/pi/PiLock"
1416
import { PiX } from "@react-icons/all-files/pi/PiX"
@@ -105,19 +107,47 @@ export const Header = ({
105107
flexShrink={0}
106108
>
107109
{provider ? (
108-
<Flex alignItems="center" gap="0.5" mr="3">
109-
{templateId && (
110-
<Icon
111-
as={isPrivate === false ? PiGlobe : PiLock}
112-
boxSize={5}
113-
color="editorBattleshipGrey.500"
114-
/>
115-
)}
116-
<TemplateNameInput />
117-
<TemplatesDropdown onViewAllTemplates={onViewAllTemplates} />
118-
</Flex>
110+
<>
111+
<Flex alignItems="center" gap="2" px="4" height="full" ml="2">
112+
{templateId && (
113+
<Icon
114+
as={isPrivate === false ? PiGlobe : PiLock}
115+
boxSize={5}
116+
color="editorBattleshipGrey.500"
117+
/>
118+
)}
119+
<TemplateNameInput />
120+
</Flex>
121+
<Divider
122+
orientation="vertical"
123+
borderColor="editorBattleshipGrey.100"
124+
/>
125+
<IconButton
126+
aria-label="Settings"
127+
icon={<Icon as={PiGear} boxSize={6} />}
128+
variant="ghost"
129+
height="full"
130+
width="20"
131+
borderRadius="0"
132+
size="md"
133+
color="editorBattleshipGrey.500"
134+
/>
135+
<Divider
136+
orientation="vertical"
137+
borderColor="editorBattleshipGrey.100"
138+
/>
139+
<Flex alignItems="center" height="full">
140+
<TemplatesDropdown onViewAllTemplates={onViewAllTemplates} />
141+
</Flex>
142+
<Divider
143+
orientation="vertical"
144+
borderColor="editorBattleshipGrey.100"
145+
/>
146+
</>
119147
) : null}
120-
<TemplateStatus />
148+
<Flex ml="6">
149+
<TemplateStatus />
150+
</Flex>
121151
<Spacer />
122152
{exportOptions
123153
?.filter((exportOption) =>

0 commit comments

Comments
 (0)