Skip to content

Commit

Permalink
fix(graph): add spacing between graph details top
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Sep 26, 2024
1 parent fb54359 commit af2b7e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ export const ProjectDetails = ({
</p>
) : null}
{projectData.tags && projectData.tags.length ? (
<TagList tags={projectData.tags} />
<TagList className="mb-2" tags={projectData.tags} />
) : null}
{projectData.root ? (
<p>
<p className="mb-2">
<span className="font-medium">Root:</span>
<span className="font-mono"> {projectData.root.trim()}</span>
</p>
) : null}
{projectData.projectType ?? typeToProjectType[project.type] ? (
<p>
<p className="mb-2">
<span className="font-medium">Type:</span>
<span className="ml-2 font-mono capitalize">
{projectData.projectType ?? typeToProjectType[project.type]}
Expand Down
6 changes: 4 additions & 2 deletions graph/ui-project-details/src/lib/tag-list/tag-list.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import React, { useState, useRef, useEffect } from 'react';
import { Pill } from '../pill';
import { twMerge } from 'tailwind-merge';

interface TagListProps {
tags: string[];
className: string;
}

export function TagList({ tags }: TagListProps) {
export function TagList({ tags, className }: TagListProps) {
const [isExpanded, _setIsExpanded] = useState(false);
const [isOverflowing, setIsOverflowing] = useState(false);
const tagsContainerRef = useRef<HTMLSpanElement>(null);
Expand Down Expand Up @@ -34,7 +36,7 @@ export function TagList({ tags }: TagListProps) {
}, [tagsContainerRef]);

return (
<div className="relative max-w-full">
<div className={twMerge('relative max-w-full', className)}>
<p className="flex min-w-0 font-medium leading-loose">
<span className="inline-block">Tags:</span>

Expand Down

0 comments on commit af2b7e4

Please sign in to comment.