fix alignment of icon with text for category tree nodes

This commit is contained in:
Athou
2023-05-23 15:17:04 +02:00
parent e84a1289e3
commit bc7c50f0f3

View File

@@ -1,4 +1,4 @@
import { Box, createStyles } from "@mantine/core"
import { Box, Center, createStyles } from "@mantine/core"
import { FeedFavicon } from "components/content/FeedFavicon"
import React, { ReactNode } from "react"
import { UnreadCount } from "./UnreadCount"
@@ -50,7 +50,7 @@ export function TreeNode(props: TreeNodeProps) {
return (
<Box py={1} pl={props.level * 20} className={classes.node} onClick={(e: React.MouseEvent) => props.onClick(e, props.id)}>
<Box mr={6} onClick={(e: React.MouseEvent) => props.onIconClick && props.onIconClick(e, props.id)}>
{typeof props.icon === "string" ? <FeedFavicon url={props.icon} /> : props.icon}
<Center>{typeof props.icon === "string" ? <FeedFavicon url={props.icon} /> : props.icon}</Center>
</Box>
<Box className={classes.nodeText}>{props.name}</Box>
{!props.expanded && (