Specify smaller size definition for circle icon

This commit is contained in:
Florian Scholdei
2025-03-24 21:43:46 +01:00
parent 126edaec87
commit 7104cc5b69

View File

@@ -28,7 +28,13 @@ const StackedSpan = styled.span`
font-size: 0.5em;
`;
const StyledIcon = styled(Icon)`
const StyledIcon = styled(Icon)<{ isSmaller?: boolean }>`
${({ isSmaller }) =>
isSmaller &&
`
font-size: 0.5em;
margin-top: 0.05rem;
`}
min-width: 1.5rem;
`;
@@ -147,6 +153,7 @@ const TreeFile: FC<FileProps> = ({ changeType, path, parentPath, currentFile, se
<StackedSpan className="fa-stack">
<StyledIcon
className={classNames("fa-stack-2x", `has-text-${getColor(changeType)}`)}
isSmaller={getIcon(changeType) === "circle"}
key={completePath + "file"}
type="fas"
alt={t("diff.showContent")}
@@ -165,6 +172,7 @@ const TreeFile: FC<FileProps> = ({ changeType, path, parentPath, currentFile, se
<StackedSpan className="fa-stack">
<StyledIcon
className={classNames("fa-stack-2x", `has-text-${getColor(changeType)}`)}
isSmaller={getIcon(changeType) === "circle"}
key={completePath + "file"}
type="far"
alt={t("diff.showContent")}