Skip to content

Commit

Permalink
1-3145: counteract the MUI button's negative margin
Browse files Browse the repository at this point in the history
This change styles the project status svg for this by giving it a
negative margin in this case.

This isn't a native MUI icon, so handling it is a bit tricky. That
said, the ideal solution would be to make the icon conform better to
MUI standards, but this is a quick fix for now.
  • Loading branch information
thomasheartman committed Nov 21, 2024
1 parent c18952f commit 6688259
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/component/project/Project/Project.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ const ProjectStatusButton = styled(Button)(({ theme }) => ({
},
}));

const ProjectStatusSvgWithMargin = styled(ProjectStatusSvg)(({ theme }) => ({
marginLeft: theme.spacing(0.5),
}));

export const Project = () => {
const projectId = useRequiredPathParam('projectId');
const { trackEvent } = usePlausibleTracker();
Expand Down Expand Up @@ -300,7 +304,7 @@ export const Project = () => {
{simplifyProjectOverview && (
<ProjectStatusButton
onClick={() => setProjectStatusOpen(true)}
startIcon={<ProjectStatusSvg />}
startIcon={<ProjectStatusSvgWithMargin />}
data-loading-project
>
Project status
Expand Down

0 comments on commit 6688259

Please sign in to comment.