Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Update image icon

dominik-zeglenb1b460bc37a9
diff --git a/saleor/static/dashboard-next/components/ImageUpload/ImageUpload.tsx b/saleor/static/dashboard-next/components/ImageUpload/ImageUpload.tsx
index a0a8a3fa14..3d0ed56638 100644
--- a/saleor/static/dashboard-next/components/ImageUpload/ImageUpload.tsx
+++ b/saleor/static/dashboard-next/components/ImageUpload/ImageUpload.tsx
@@ -6,19 +6,15 @@ import {
} from "@material-ui/core/styles";
import { fade } from "@material-ui/core/styles/colorManipulator";
import Typography from "@material-ui/core/Typography";
-import AddPhotoIcon from "@material-ui/icons/AddAPhoto";
import classNames from "classnames";
import * as React from "react";
import i18n from "../../i18n";
+import ImageIcon from "../../icons/Image";
import Dropzone from "../Dropzone";
interface ImageUploadProps {
- children?: (
- props: {
- isDragActive: boolean;
- }
- ) => React.ReactNode;
+ children?: (props: { isDragActive: boolean }) => React.ReactNode;
className?: string;
disableClick?: boolean;
isActiveClassName?: string;
@@ -58,7 +54,7 @@ const styles = (theme: Theme) =>
textAlign: "center"
},
uploadText: {
- color: "inherit",
+ color: theme.typography.body1.color,
textTransform: "uppercase"
}
});
@@ -97,7 +93,7 @@ export const ImageUpload = withStyles(styles, { name: "ImageUpload" })(
})}
>
<input {...getInputProps()} className={classes.fileField} />
- <AddPhotoIcon className={classes.photosIcon} />
+ <ImageIcon className={classes.photosIcon} />
<Typography className={classes.uploadText} variant="body2">
{i18n.t("Drop here to upload", {
context: "image upload"
diff --git a/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx b/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx
index f80fa7aa19..60f39a0574 100644
--- a/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx
+++ b/saleor/static/dashboard-next/components/TableCellAvatar/TableCellAvatar.tsx
@@ -10,7 +10,7 @@ import Cached from "@material-ui/icons/Cached";
import * as classNames from "classnames";
import * as React from "react";
-import NoPhoto from "../../icons/NoPhoto";
+import Image from "../../icons/Image";
const styles = (theme: Theme) =>
createStyles({
@@ -43,7 +43,7 @@ const TableCellAvatar = withStyles(styles, { name: "TableCellAvatar" })(
</Avatar>
) : thumbnail === null ? (
<Avatar className={classNames(classes.avatar, avatarProps)}>
- <NoPhoto color="primary" />
+ <Image color="primary" />
</Avatar>
) : (
<Avatar
diff --git a/saleor/static/dashboard-next/icons/Image.tsx b/saleor/static/dashboard-next/icons/Image.tsx
new file mode 100644
index 0000000000..d165fb7277
--- /dev/null
+++ b/saleor/static/dashboard-next/icons/Image.tsx
@@ -0,0 +1,26 @@
+import createSvgIcon from "@material-ui/icons/utils/createSvgIcon";
+import * as React from "react";
+
+export const Image = createSvgIcon(
+ <>
+ <path
+ d="M6.10864 17.8974H3.29212C3.23158 17.8878 3.16942 17.8772 3.12042 17.8416C3.04669 17.788 3.01472 17.6983 3 17.6051V3.29232C3.01963 3.16818 3.08547 3.05213 3.20185 3.01431C3.23081 3.00488 3.26204 3.00477 3.29212 3H17.595C17.6248 3.00477 17.655 3.00954 17.6851 3.01431C17.7693 3.05715 17.8446 3.11527 17.8727 3.20199C17.8821 3.23097 17.8821 3.26223 17.887 3.29232V6.10798L20.7073 6.10342C20.7374 6.10815 20.7676 6.11285 20.7977 6.11759C20.8819 6.16039 20.9572 6.21852 20.9856 6.3053C20.9951 6.33435 20.9951 6.36561 21 6.39574V20.7074C20.9804 20.8315 20.9145 20.9476 20.7981 20.9854C20.769 20.9948 20.7378 20.9949 20.7076 20.9997L6.4008 21C6.34022 20.9904 6.27807 20.9798 6.22906 20.9442C6.15534 20.8906 6.1234 20.8009 6.10864 20.7077V17.8974ZM20.4156 18.1487H6.69292V20.4154L20.4156 20.415V18.1487ZM17.3216 10.7226L14.5234 13.4247L18.5752 17.4543C18.6102 17.5025 18.6316 17.5227 18.6457 17.5641H20.4156V13.6145L17.3216 10.7226ZM7.13581 17.5392C7.13753 17.5474 7.13886 17.5557 7.13988 17.5641H17.8565L12.6137 12.3498L7.13581 17.5392ZM17.3027 6.10892V3.58465H3.58424V17.3128H6.10864V6.41886C6.11821 6.35835 6.1288 6.29622 6.16431 6.24721C6.21777 6.17347 6.30727 6.14141 6.40031 6.12653L17.3027 6.10892ZM20.4156 12.8145V6.68856C15.8415 6.69596 11.2671 6.70333 6.69292 6.71073V17.1537L12.4178 11.7303C12.4913 11.6796 12.492 11.6793 12.5774 11.6532C12.6073 11.6536 12.6371 11.6539 12.667 11.6543C12.7517 11.6824 12.7524 11.6827 12.8246 11.7352L14.1087 13.0125L17.1155 10.1091C17.2122 10.0238 17.2154 10.0181 17.3552 10.0295C17.453 10.0463 17.4713 10.0661 17.5179 10.1059L20.4156 12.8145ZM9.46155 7.9651C10.1933 7.97204 10.8858 8.53631 11.0257 9.26605C11.125 9.7844 10.9492 10.3474 10.571 10.717C10.1291 11.1488 9.4265 11.2926 8.84531 11.0548C8.33223 10.8449 7.94546 10.3525 7.86504 9.80323C7.7658 9.12545 8.15208 8.40581 8.77376 8.11517C8.98813 8.01494 9.22433 7.96432 9.46155 7.9651ZM9.44459 8.54974C8.98175 8.55416 8.54681 8.90584 8.45303 9.36375C8.32277 10 8.9137 10.7061 9.63799 10.5718C10.051 10.4953 10.398 10.137 10.4593 9.71848C10.5424 9.15123 10.0783 8.55953 9.46446 8.54981C9.45784 8.54974 9.45121 8.54974 9.44459 8.54974Z"
+ fill="url(#paint0_linear)"
+ />
+ <defs>
+ <linearGradient
+ id="paint0_linear"
+ x1="3"
+ y1="3"
+ x2="22.8"
+ y2="23.5714"
+ gradientUnits="userSpaceOnUse"
+ >
+ <stop stop-color="#13BEBB" />
+ <stop offset="1" stop-color="#3EE7CD" />
+ </linearGradient>
+ </defs>
+ </>
+);
+Image.displayName = "Image";
+export default Image;