Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix description icon being part of the link #460

Merged
merged 6 commits into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 31 additions & 16 deletions src/components/config/ConfigurationStructureDiagram.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,22 +158,37 @@ export default function ConfigurationStructureDiagram(): JSX.Element {
>
{level > 0 && <IndentationArrow level={level} />}

<Link
className={clsx(
!isFolder && "config-explorer-file-node",
isFolder && "config-explorer-file-folder-node",
hasUrl && "config-explorer-file-node-with-link",
isExternal && "config-explorer-file-folder-node-with-link"
<div className="config-explorer-node-content config-explorer-node">
{hasUrl ? (
<Link
className={clsx(
!isFolder && "config-explorer-file-node",
isFolder && "config-explorer-file-folder-node",
"config-explorer-file-node-with-link",
isExternal && "config-explorer-file-folder-node-with-link"
)}
to={node.url}
>
<Icon
icon={isFolder ? folderIcon : fileIcon}
className={"config-explorer-icon config-explorer-node-icon"}
/>
<span className={"config-node-contents-wrapper"}>{node.name}</span>
</Link>
) : (
<span
className={clsx(
!isFolder && "config-explorer-file-node",
isFolder && "config-explorer-file-folder-node"
)}
>
<Icon
icon={isFolder ? folderIcon : fileIcon}
className={"config-explorer-icon config-explorer-node-icon"}
/>
<span className={"config-node-contents-wrapper"}>{node.name}</span>
</span>
)}
to={node.url}
>
<span className={"config-node-contents-wrapper"}>
<Icon
icon={isFolder ? folderIcon : fileIcon}
className={"config-explorer-icon config-explorer-node-icon"}
/>
{node.name}
</span>
{hasDescription && (
<span
className={"config-explorer-popup-window-open-tag"}
Expand All @@ -182,7 +197,7 @@ export default function ConfigurationStructureDiagram(): JSX.Element {
</span>
)}
</Link>
</div>

{hasDescription && (
<div className={"config-explorer-popup-window-container"}>
Expand Down
6 changes: 6 additions & 0 deletions src/css/configuration-explorer-layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
}

/* File Node */
.config-explorer-node {
display: flex;
align-items: center;
}

.config-explorer-file-node {
display: flex;
align-items: center;
Expand Down Expand Up @@ -78,6 +83,7 @@

.config-explorer-popup-window-open-tag {
z-index: 5;
margin-left: 3px;
}

.config-explorer-popup-window-open-tag:hover {
Expand Down