Skip to content

Commit 65a6f3e

Browse files
authored
style: update header layout with consistent button styling and spacing adjustments (#3)
1 parent d388f7d commit 65a6f3e

File tree

5 files changed

+25
-16
lines changed

5 files changed

+25
-16
lines changed

examples/react-example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"@imagekit/editor": "1.1.0",
6+
"@imagekit/editor": "1.2.0",
77
"@types/node": "^20.11.24",
88
"@types/react": "^17.0.2",
99
"@types/react-dom": "^17.0.2",

packages/imagekit-editor-dev/src/components/editor/wrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function EditorWrapper({ children }: EditorWrapperProps) {
88
return (
99
<Box
1010
position="fixed"
11-
zIndex="modal"
11+
zIndex="2100"
1212
height="100vh"
1313
width="100vw"
1414
top={0}

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

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,14 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
5757
alignItems="center"
5858
flexDirection="row"
5959
px="1rem"
60+
paddingRight="0"
6061
borderBottomWidth="1px"
6162
borderBottomColor="editorBattleshipGrey.100"
62-
gap="4"
6363
flexShrink={0}
6464
>
6565
<Icon
6666
boxSize={"5"}
67+
mr="4"
6768
as={imageList.length === 1 ? PiImageSquare : PiImagesSquare}
6869
/>
6970
<Text>{headerText}</Text>
@@ -87,23 +88,28 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
8788
aria-label={exportOption.label}
8889
variant="ghost"
8990
fontWeight="normal"
91+
height="full"
92+
borderRadius="0"
93+
px="8"
9094
size="sm"
9195
onClick={() => exportOption.onClick(imageList, currentImage)}
9296
>
9397
{exportOption.label}
9498
</Button>
9599
) : (
96100
<Menu key={`export-menu-${exportOption.label}`}>
97-
<MenuButton>
98-
<Button
99-
leftIcon={exportOption.icon}
100-
aria-label={exportOption.label}
101-
variant="ghost"
102-
fontWeight="normal"
103-
size="sm"
104-
>
105-
{exportOption.label}
106-
</Button>
101+
<MenuButton
102+
as={Button}
103+
leftIcon={exportOption.icon}
104+
aria-label={exportOption.label}
105+
variant="ghost"
106+
fontWeight="normal"
107+
height="full"
108+
borderRadius="0"
109+
px="8"
110+
size="sm"
111+
>
112+
{exportOption.label}
107113
</MenuButton>
108114
<MenuList>
109115
{exportOption.options
@@ -132,6 +138,9 @@ export const Header = ({ onClose, exportOptions }: HeaderProps) => {
132138
onClick={onClose}
133139
variant="ghost"
134140
fontWeight="normal"
141+
height="full"
142+
borderRadius="0"
143+
px="8"
135144
size="sm"
136145
>
137146
Close

packages/imagekit-editor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@imagekit/editor",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Image Editor powered by ImageKit",
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.es.js",

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ __metadata:
16511651
languageName: node
16521652
linkType: hard
16531653

1654-
"@imagekit/editor@npm:1.1.0, @imagekit/editor@workspace:packages/imagekit-editor":
1654+
"@imagekit/editor@npm:1.2.0, @imagekit/editor@workspace:packages/imagekit-editor":
16551655
version: 0.0.0-use.local
16561656
resolution: "@imagekit/editor@workspace:packages/imagekit-editor"
16571657
peerDependencies:
@@ -4188,7 +4188,7 @@ __metadata:
41884188
version: 0.0.0-use.local
41894189
resolution: "react-example@workspace:examples/react-example"
41904190
dependencies:
4191-
"@imagekit/editor": "npm:1.1.0"
4191+
"@imagekit/editor": "npm:1.2.0"
41924192
"@types/node": "npm:^20.11.24"
41934193
"@types/react": "npm:^17.0.2"
41944194
"@types/react-dom": "npm:^17.0.2"

0 commit comments

Comments
 (0)