Skip to content

Commit

Permalink
fix alignment of icon with text for category tree nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Athou committed May 23, 2023
1 parent e84a128 commit bc7c50f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions commafeed-client/src/components/sidebar/TreeNode.tsx
Original file line number Diff line number Diff line change
@@ -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"
Expand Down Expand Up @@ -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 && (
Expand Down

0 comments on commit bc7c50f

Please sign in to comment.