Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix upload button and cog icon

Sara Vieiraaaea4867fe06
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/add-an-asset-form.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/add-an-asset-form.tsx
index e0bdfb30b8..5d6650e7b2 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/add-an-asset-form.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/add-an-asset-form.tsx
@@ -3,6 +3,10 @@ import ObjectID from "bson-objectid";
import { ChangeEvent, useRef } from "react";
import { Button } from "@webstudio-is/design-system";
import { Asset, UploadingAsset } from "@webstudio-is/asset-uploader";
+import { UploadIcon } from "@webstudio-is/icons";
+import { Box } from "@webstudio-is/design-system";
+import { Flex } from "@webstudio-is/design-system";
+import { Text } from "@webstudio-is/design-system";
const readImages = async (fileList: FileList) => {
const images = [];
@@ -61,8 +65,12 @@ export const AddAnAssetForm = ({
variant="blue"
type="button"
onClick={() => inputRef?.current?.click()}
+ size={2}
>
- Upload Image
+ <Flex align="center" gap={1}>
+ <UploadIcon />
+ <Text>Upload</Text>
+ </Flex>
</Button>
</Form>
);
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-manager.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-manager.tsx
index d8b05875e5..e57c7603ba 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-manager.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-manager.tsx
@@ -56,7 +56,11 @@ export const TabContent = ({
onSetActiveTab("none");
}}
/>
- <Flex gap="3" direction="column" css={{ padding: "$1" }}>
+ <Flex
+ gap="3"
+ direction="column"
+ css={{ padding: "$1", paddingTop: "$2" }}
+ >
<Flex justify="end">
<AddAnAssetForm onSubmit={onUploadAsset} />
</Flex>
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-thumbnail.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-thumbnail.tsx
index c3666c31a5..7fee61ba3d 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-thumbnail.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-thumbnail.tsx
@@ -70,6 +70,9 @@ export const AssetThumbnail = (asset: Asset | UploadingAsset) => {
"&:hover button": {
opacity: 1,
+ "path, circle": {
+ stroke: "$slate11",
+ },
},
}}
>
diff --git a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-tooltip.tsx b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-tooltip.tsx
index de28640353..6adb521185 100644
--- a/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-tooltip.tsx
+++ b/apps/designer/app/designer/features/sidebar-left/panels/asset-manager/asset-tooltip.tsx
@@ -46,8 +46,17 @@ export const AssetTooltip = ({
top: "$1",
right: "$1",
cursor: "pointer",
- color: "$hiContrast",
transition: "opacity 100ms ease",
+
+ "svg path": {
+ fill: "$loContrast",
+ },
+
+ "&:hover": {
+ "svg path, svg circle": {
+ stroke: "$hiContrast",
+ },
+ },
}}
>
<GearIcon />
diff --git a/packages/design-system/src/components/button.tsx b/packages/design-system/src/components/button.tsx
index 01bed7974d..eb0394f82d 100644
--- a/packages/design-system/src/components/button.tsx
+++ b/packages/design-system/src/components/button.tsx
@@ -7,6 +7,7 @@ export const Button = styled("button", {
boxSizing: "border-box",
border: "none",
userSelect: "none",
+ transition: "all 200ms ease-out",
"&::before": {
boxSizing: "border-box",
},
@@ -83,24 +84,24 @@ export const Button = styled("button", {
},
},
blue: {
- backgroundColor: "$blue2",
- boxShadow: "inset 0 0 0 1px $colors$blue7",
- color: "$blue11",
+ backgroundColor: "$blue10",
+ color: "$loContrast",
"@hover": {
"&:hover": {
- boxShadow: "inset 0 0 0 1px $colors$blue8",
+ backgroundColor: "$loContrast",
+ color: "$blue10",
+ boxShadow: "inset 0 0 0 1.5px $colors$blue10",
},
},
"&:active": {
- backgroundColor: "$blue3",
- boxShadow: "inset 0 0 0 1px $colors$blue8",
+ boxShadow: "inset 0 0 0 1.5px $colors$blue8",
},
"&:focus": {
- boxShadow: "inset 0 0 0 1px $colors$blue8, 0 0 0 1px $colors$blue8",
+ boxShadow:
+ "inset 0 0 0 1.5px $colors$blue8, 0 0 0 1.5px $colors$blue8",
},
'&[data-state="open"]': {
- backgroundColor: "$blue4",
- boxShadow: "inset 0 0 0 1px $colors$blue8",
+ boxShadow: "inset 0 0 0 1.5px $colors$blue8",
},
},
green: {
diff --git a/packages/icons/src/gear.tsx b/packages/icons/src/gear.tsx
new file mode 100644
index 0000000000..2891dc56d7
--- /dev/null
+++ b/packages/icons/src/gear.tsx
@@ -0,0 +1,35 @@
+import * as React from "react";
+import { IconProps } from "./types";
+
+export const GearIcon = React.forwardRef<SVGSVGElement, IconProps>(
+ ({ color = "currentColor", ...props }, forwardedRef) => {
+ return (
+ <svg
+ width={16}
+ height={16}
+ viewBox="0 0 16 16"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ ref={forwardedRef}
+ >
+ <path
+ d="M9.117 2.878c-.284-1.17-1.95-1.17-2.234 0a1.149 1.149 0 01-1.714.71c-1.03-.627-2.207.551-1.58 1.58a1.15 1.15 0 01-.711 1.715c-1.17.284-1.17 1.95 0 2.234a1.15 1.15 0 01.71 1.714c-.627 1.03.551 2.207 1.58 1.58a1.148 1.148 0 011.715.711c.284 1.17 1.95 1.17 2.234 0a1.15 1.15 0 011.714-.71c1.03.627 2.207-.551 1.58-1.58a1.148 1.148 0 01.711-1.715c1.17-.284 1.17-1.95 0-2.234a1.15 1.15 0 01-.71-1.714c.627-1.03-.551-2.207-1.58-1.58a1.15 1.15 0 01-1.715-.711z"
+ stroke={color}
+ strokeWidth={1.25}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ />
+ <circle
+ cx={8}
+ cy={7.99988}
+ r={1.875}
+ stroke={color}
+ strokeWidth={1.25}
+ />
+ </svg>
+ );
+ }
+);
+
+GearIcon.displayName = "GearIcon";
diff --git a/packages/icons/src/index.ts b/packages/icons/src/index.ts
index cab70530d6..de149e8eda 100644
--- a/packages/icons/src/index.ts
+++ b/packages/icons/src/index.ts
@@ -14,3 +14,5 @@ export { AspectRatioIcon } from "./aspect-ratio";
export * from "./cloud";
export { TrashIcon } from "./trash";
export { SizeIcon } from "./size";
+export { UploadIcon } from "./upload";
+export { GearIcon } from "./gear";
diff --git a/packages/icons/src/upload.tsx b/packages/icons/src/upload.tsx
new file mode 100644
index 0000000000..ed7eb93d64
--- /dev/null
+++ b/packages/icons/src/upload.tsx
@@ -0,0 +1,25 @@
+import * as React from "react";
+import { IconProps } from "./types";
+
+export const UploadIcon = React.forwardRef<SVGSVGElement, IconProps>(
+ ({ color = "currentColor", ...props }, forwardedRef) => {
+ return (
+ <svg
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ fill="none"
+ xmlns="http://www.w3.org/2000/svg"
+ {...props}
+ ref={forwardedRef}
+ >
+ <path
+ d="M9.758 8.442a.625.625 0 10.884-.884l-.884.884zM8 5.8l.442-.442a.625.625 0 00-.884 0L8 5.8zM5.358 7.558a.625.625 0 10.884.884l-.884-.884zM7.375 10.2a.625.625 0 101.25 0h-1.25zm5.5-2.2A4.875 4.875 0 018 12.875v1.25A6.125 6.125 0 0014.125 8h-1.25zM8 12.875A4.875 4.875 0 013.125 8h-1.25A6.125 6.125 0 008 14.125v-1.25zM3.125 8A4.875 4.875 0 018 3.125v-1.25A6.125 6.125 0 001.875 8h1.25zM8 3.125A4.875 4.875 0 0112.875 8h1.25A6.125 6.125 0 008 1.875v1.25zm2.642 4.433l-2.2-2.2-.884.884 2.2 2.2.884-.884zm-3.084-2.2l-2.2 2.2.884.884 2.2-2.2-.884-.884zM8.625 10.2V5.8h-1.25v4.4h1.25z"
+ fill={color}
+ />
+ </svg>
+ );
+ }
+);
+
+UploadIcon.displayName = "UploadIcon";