Skip to content

Commit

Permalink
Added min width/height to image thumbnail icon | set getImage height … (
Browse files Browse the repository at this point in the history
  • Loading branch information
geodem127 authored Feb 18, 2025
1 parent 3d6583c commit 90751d7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ export const DialogContentItem = ({ item }: DialogContentItemProps) => {
backgroundColor: "grey.100",
width: 40,
height: 40,
minWidth: 40,
minHeight: 40,
alignItems: "center",
justifyContent: "center",
overflow: "hidden",
Expand Down
2 changes: 1 addition & 1 deletion src/apps/content-editor/src/app/views/ItemList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ export const ItemList = () => {
CONFIG.SERVICE_MEDIA_RESOLVER
}/resolve/${
value?.split(",")[0]
}/getimage/?w=${68}&h=${58}&type=fit`
}/getimage/?w=${68}&h=auto&type=fit`
: value?.split(",")?.[0];
break;
case "internal_link":
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import {
DialogContent,
DialogTitle,
Expand All @@ -23,6 +23,12 @@ interface Props {
onFieldClick: (fieldType: string, fieldName: string) => void;
onModalClose: () => void;
}

const FIELD_CATEGORIES: Record<string, string> = {
dateandtime: "Date & Time",
options: "Advanced",
};

export const FieldSelection = ({ onFieldClick, onModalClose }: Props) => {
const user: User = useSelector((state: AppState) => state.user);
const [fieldTypes, setFieldTypes] = useState(FIELD_COPY_CONFIG);
Expand Down Expand Up @@ -137,7 +143,7 @@ export const FieldSelection = ({ onFieldClick, onModalClose }: Props) => {
mb={1.5}
color="text.secondary"
>
{fieldKey === "dateandtime" ? "Date & Time" : fieldKey}
{FIELD_CATEGORIES?.[fieldKey] || fieldKey}
</Typography>
<Box
display="grid"
Expand Down

0 comments on commit 90751d7

Please sign in to comment.