diff --git a/editor.planx.uk/src/components/EditorNavMenu.tsx b/editor.planx.uk/src/components/EditorNavMenu.tsx index a3af14ef2e..1675a4a0c0 100644 --- a/editor.planx.uk/src/components/EditorNavMenu.tsx +++ b/editor.planx.uk/src/components/EditorNavMenu.tsx @@ -62,21 +62,6 @@ const MenuTitle = styled(Typography)(({ theme }) => ({ textAlign: "left", })) as typeof Typography; -const TooltipWrap = styled(({ className, ...props }: TooltipProps) => ( - -))(() => ({ - [`& .${tooltipClasses.arrow}`]: { - color: "#2c2c2c", - }, - [`& .${tooltipClasses.tooltip}`]: { - backgroundColor: "#2c2c2c", - left: "-5px", - fontSize: "0.8em", - borderRadius: 0, - fontWeight: FONT_WEIGHT_SEMI_BOLD, - }, -})); - const MenuButton = styled(IconButton, { shouldForwardProp: (prop) => prop !== "isActive", })<{ isActive: boolean }>(({ theme, isActive, disabled }) => ({ @@ -273,7 +258,7 @@ function EditorNavMenu() { {visibleRoutes.map(({ title, Icon, route, disabled }) => ( {compact ? ( - + - + ) : ( ( - -))(() => ({ - [`& .${tooltipClasses.arrow}`]: { - color: "#2c2c2c", - }, - [`& .${tooltipClasses.tooltip}`]: { - backgroundColor: "#2c2c2c", - left: "-5px", - fontSize: "0.8em", - borderRadius: 0, - fontWeight: FONT_WEIGHT_SEMI_BOLD, - }, -})); export const ToggleTagsButton: React.FC = () => { const [showTags, toggleShowTags] = useStore((state) => [ @@ -41,7 +24,7 @@ export const ToggleTagsButton: React.FC = () => { background: theme.palette.background.paper, })} > - + { > {showTags ? : } - + ); }; diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FlowStatus/PublicLink.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FlowStatus/PublicLink.tsx index 6bc4a1fab3..6b01df2353 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FlowStatus/PublicLink.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FlowStatus/PublicLink.tsx @@ -2,7 +2,6 @@ import ContentCopyIcon from "@mui/icons-material/ContentCopy"; import Box from "@mui/material/Box"; import Button from "@mui/material/Button"; import Link from "@mui/material/Link"; -import Tooltip from "@mui/material/Tooltip"; import Typography from "@mui/material/Typography"; import { FlowStatus } from "@opensystemslab/planx-core/types"; import React, { useState } from "react"; @@ -11,27 +10,25 @@ import SettingsDescription from "ui/editor/SettingsDescription"; const CopyButton = (props: { link: string; isActive: boolean }) => { const [copyMessage, setCopyMessage] = useState<"copy" | "copied">("copy"); return ( - - - + ); }; diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx index 069b00572b..1d3fa018c7 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Settings/Submissions/EventsLog.tsx @@ -146,7 +146,7 @@ const CollapsibleRow: React.FC = (submission) => { {submission.sessionId} {showDownloadButton && ( - + ( - -))(({ theme }) => ({ - [`& .${tooltipClasses.tooltip}`]: { - backgroundColor: theme.palette.background.dark, - fontSize: "0.8em", - borderRadius: 0, - fontWeight: FONT_WEIGHT_SEMI_BOLD, - }, -})); - const HistoryListItem = styled("li")(() => ({ listStyleType: "square", overflowWrap: "break-word", @@ -184,7 +173,7 @@ const EditHistory = () => { {i > 0 && op.actor && canUserEditTeam(teamSlug) && ( - + handleUndo(i)} @@ -196,7 +185,7 @@ const EditHistory = () => { color={inUndoScope(i) ? "inherit" : "primary"} /> - + )} {op.data && ( diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishDialog.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishDialog.tsx index 35495d1c56..4317d73d8f 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishDialog.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/Publish/PublishDialog.tsx @@ -244,7 +244,9 @@ const LightTooltip = styled(({ className, ...props }: TooltipProps) => ( backgroundColor: theme.palette.background.default, color: theme.palette.text.primary, boxShadow: theme.shadows[1], - fontSize: theme.typography.body2, + fontSize: 11, + fontWeight: theme.typography.fontWeightRegular, + borderRadius: 4, }, })); @@ -278,6 +280,7 @@ export const ValidationChecks = (props: { diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/index.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/index.tsx index ea7475c23e..cdfc67786c 100644 --- a/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/index.tsx +++ b/editor.planx.uk/src/pages/FlowEditor/components/Sidebar/index.tsx @@ -126,12 +126,14 @@ const TabList = styled(Box)(({ theme }) => ({ })); const Sidebar: React.FC = React.memo(() => { - const [resetPreview, isFlowPublished, toggleSidebar, showSidebar] = useStore((state) => [ - state.resetPreview, - state.isFlowPublished, - state.toggleSidebar, - state.showSidebar, - ]); + const [resetPreview, isFlowPublished, toggleSidebar, showSidebar] = useStore( + (state) => [ + state.resetPreview, + state.isFlowPublished, + state.toggleSidebar, + state.showSidebar, + ], + ); const [activeTab, setActiveTab] = useState("PreviewBrowser"); @@ -152,27 +154,24 @@ const Sidebar: React.FC = React.memo(() => { return ( - - {showSidebar - ? - : - } + {showSidebar ? : }
- + { - + { {isFlowPublished ? ( - + { ) : ( - + diff --git a/editor.planx.uk/src/theme.ts b/editor.planx.uk/src/theme.ts index 84932b2d4a..d93678889f 100644 --- a/editor.planx.uk/src/theme.ts +++ b/editor.planx.uk/src/theme.ts @@ -639,6 +639,23 @@ const getThemeOptions = ({ }, ], }, + MuiTooltip: { + defaultProps: { + arrow: true, + }, + styleOverrides: { + arrow: { + color: "#2c2c2c", + }, + tooltip: { + backgroundColor: "#2c2c2c", + left: "-5px", + fontSize: "0.8em", + borderRadius: 0, + fontWeight: FONT_WEIGHT_SEMI_BOLD, + }, + }, + }, }, };