diff --git a/web/src/components/app-header/LoginAppHeader.tsx b/web/src/components/app-header/LoginAppHeader.tsx index b22c8334..31582960 100644 --- a/web/src/components/app-header/LoginAppHeader.tsx +++ b/web/src/components/app-header/LoginAppHeader.tsx @@ -116,7 +116,7 @@ const LoginAppHeader = ({ - + )} diff --git a/web/src/components/dialogs/files-dialog/file-item.tsx b/web/src/components/dialogs/files-dialog/file-item.tsx index 917fe5aa..53290187 100644 --- a/web/src/components/dialogs/files-dialog/file-item.tsx +++ b/web/src/components/dialogs/files-dialog/file-item.tsx @@ -44,7 +44,7 @@ export const FileItem = ({ )} > @@ -137,7 +137,7 @@ const OverlayDialog = ({ } onClick={shouldIncrement ? pause : play} @@ -149,7 +149,7 @@ const OverlayDialog = ({ diff --git a/web/src/components/editors/ImageBox.tsx b/web/src/components/editors/ImageBox.tsx index 6aacddca..ffbfd9ef 100644 --- a/web/src/components/editors/ImageBox.tsx +++ b/web/src/components/editors/ImageBox.tsx @@ -422,7 +422,7 @@ const SettingsPanel = ({ { setCurrZoom((prevZoom) => prevZoom + 0.2); }} @@ -436,7 +436,7 @@ const SettingsPanel = ({ { setCurrZoom(1); }} @@ -450,7 +450,7 @@ const SettingsPanel = ({ { setCurrZoom((prevZoom) => prevZoom <= 1 ? prevZoom : prevZoom - 0.2 @@ -469,7 +469,7 @@ const SettingsPanel = ({ { changeImage(); }} @@ -483,7 +483,7 @@ const SettingsPanel = ({ { const imageEditorObj = { expoId: expoId, @@ -503,7 +503,7 @@ const SettingsPanel = ({ { dispatch( setDialog(DialogType.ConfirmDialog, { diff --git a/web/src/components/form/formik/ColorPicker.tsx b/web/src/components/form/formik/ColorPicker.tsx index 0a0b1237..bb367fd0 100644 --- a/web/src/components/form/formik/ColorPicker.tsx +++ b/web/src/components/form/formik/ColorPicker.tsx @@ -79,17 +79,17 @@ const ColorPicker = ({ name, color, setColor, label }: ColorPickerProps) => {
setIsColorEditModeOn((prev) => !prev)} />
!isColorEditModeOn && openColorPicker()} />
diff --git a/web/src/components/icon/icon.tsx b/web/src/components/icon/icon.tsx index e99c39eb..4ff9adc5 100644 --- a/web/src/components/icon/icon.tsx +++ b/web/src/components/icon/icon.tsx @@ -1,16 +1,18 @@ import { CSSProperties, ReactNode } from "react"; - import { useExpoDesignData } from "hooks/view-hooks/expo-design-data-hook"; +// Components import { Icon as MuiIcon } from "@mui/material"; import FontIcon from "react-md/lib/FontIcons/FontIcon"; - import { BasicTooltip } from "components/tooltip/BasicTooltip"; import { BasicTooltipProps } from "components/tooltip/tooltip-props"; +// Utils import cx from "classnames"; -interface IconProps { +// - - - - + +type IconProps = { name: string | ReactNode; // name either for FontIcon from 'react-md' or Icon from 'material-ui' useMaterialUiIcon?: boolean; color?: @@ -23,19 +25,25 @@ interface IconProps { | "inheritFromParents"; onClick?: () => void; noCenterPlace?: boolean; // by default, icon should be inside some container and centered - className?: string; - style?: CSSProperties; + containerClassName?: string; + containerStyle?: CSSProperties; + iconClassName?: string; + iconStyle?: CSSProperties; tooltip?: BasicTooltipProps; -} +}; + +// - - - - export const Icon = ({ name, useMaterialUiIcon = false, color = "inheritFromParents", - className, - style, onClick, noCenterPlace = false, + containerClassName, + containerStyle, + iconClassName, + iconStyle, tooltip, }: IconProps) => { const { expoDesignData, fgThemingIf } = useExpoDesignData(); @@ -58,20 +66,29 @@ export const Icon = ({ "text-muted-400": color === "muted-400", "hover:cursor-pointer": !!onClick, }, - className + containerClassName )} style={{ + ...containerStyle, color: themeEnabledIconsColor, }} data-tooltip-id={tooltip?.id ?? undefined} > {/* Icon color either inherited from Button parent or div if some color prop is used */} {useMaterialUiIcon ? ( - + {name} ) : ( - + {name} )} diff --git a/web/src/components/infopoint/components/tooltip-infopoint/VideoContentBody.tsx b/web/src/components/infopoint/components/tooltip-infopoint/VideoContentBody.tsx index 80faa2e0..de6a152a 100644 --- a/web/src/components/infopoint/components/tooltip-infopoint/VideoContentBody.tsx +++ b/web/src/components/infopoint/components/tooltip-infopoint/VideoContentBody.tsx @@ -143,7 +143,7 @@ const VideoContentBody = ({ useMaterialUiIcon name={isVideoPlaying ? "pause" : "play_arrow"} onClick={() => playPauseVideo()} - style={{ fontSize: "22px" }} + iconStyle={{ fontSize: "22px" }} />
@@ -176,8 +176,8 @@ const VideoContentBody = ({ setVideoVolume(prevVideoVolume); } }} - style={{ fontSize: "22px" }} - className="ml-auto" + iconStyle={{ fontSize: "22px" }} + containerClassName="ml-auto" /> diff --git a/web/src/containers/expo-administration/expo-editor/screen-game-options/answers/AnswerItem.tsx b/web/src/containers/expo-administration/expo-editor/screen-game-options/answers/AnswerItem.tsx index d179a6a4..83e44e62 100644 --- a/web/src/containers/expo-administration/expo-editor/screen-game-options/answers/AnswerItem.tsx +++ b/web/src/containers/expo-administration/expo-editor/screen-game-options/answers/AnswerItem.tsx @@ -260,7 +260,7 @@ const AnswerItem = ({ { > {t("sendActionButtonLabel")} {!isSubmitting && ( - + )} {isSubmitting && ( @@ -168,7 +168,7 @@ const Toolbar = ({ useMaterialUiIcon color="white" onClick={reset} - style={{ fontSize: "24px" }} + iconStyle={{ fontSize: "24px" }} /> @@ -186,7 +186,7 @@ const Toolbar = ({ useMaterialUiIcon color="white" onClick={zoomOutside} - style={{ fontSize: "24px" }} + iconStyle={{ fontSize: "24px" }} /> @@ -205,7 +205,7 @@ const Toolbar = ({ useMaterialUiIcon color="white" onClick={openInformationDialog} - style={{ fontSize: "24px" }} + iconStyle={{ fontSize: "24px" }} /> @@ -226,7 +226,7 @@ const Toolbar = ({ useMaterialUiIcon name="close" onClick={closeLightBox} - style={{ fontSize: "24px" }} + iconStyle={{ fontSize: "24px" }} /> diff --git a/web/src/containers/views/view-screen-overlay/ActionsPanel/ReactivateTutorialButton.tsx b/web/src/containers/views/view-screen-overlay/ActionsPanel/ReactivateTutorialButton.tsx index 3eb57ebf..558b2fb4 100644 --- a/web/src/containers/views/view-screen-overlay/ActionsPanel/ReactivateTutorialButton.tsx +++ b/web/src/containers/views/view-screen-overlay/ActionsPanel/ReactivateTutorialButton.tsx @@ -37,7 +37,7 @@ const ReactivateTutorialButton = ({ content: t("reactivateTooltipButtonTooltip"), }} > - + ); diff --git a/web/src/containers/views/view-signpost/ReferenceItem.tsx b/web/src/containers/views/view-signpost/ReferenceItem.tsx index 5100f719..0a6b652d 100644 --- a/web/src/containers/views/view-signpost/ReferenceItem.tsx +++ b/web/src/containers/views/view-signpost/ReferenceItem.tsx @@ -73,7 +73,7 @@ const ReferenceItem = ({ @@ -86,7 +86,7 @@ const ReferenceItem = ({ )}