Skip to content

Commit

Permalink
Merge pull request #783 from kabalin/projectsummary
Browse files Browse the repository at this point in the history
Make ProjectSummary more visually appealing.
  • Loading branch information
andrewnicols authored Oct 27, 2023
2 parents 1e4198e + 3d7a900 commit 1728241
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 47 deletions.
94 changes: 48 additions & 46 deletions src/components/ProjectSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,52 +50,54 @@ export default function ProjectSummary(props: ProjectSummaryProps): ReactNode {

function GetProjectSummary(projectData: ProjectSummaryData): ReactNode {
return (
<table className={styles.projecttable}>
<tbody>
<tr>
<th>Owners</th>
<td>{getOwners(projectData)}</td>
</tr>
<tr>
<th>Status</th>
<td>{getStatus(projectData)}</td>
</tr>
{projectData.discussionLinks?.length > 0
&& (
<tr>
<th>Links</th>
<td>
{projectData.discussionLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</td>
</tr>
)}
{projectData.issueLinks?.length > 0
&& (
<tr>
<th>Issues</th>
<td>
{projectData.issueLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</td>
</tr>
)}
</tbody>
</table>
<div className={styles.projectsummary}>
<table>
<tbody>
<tr>
<th>Owners</th>
<td>{getOwners(projectData)}</td>
</tr>
<tr>
<th>Status</th>
<td>{getStatus(projectData)}</td>
</tr>
{projectData.discussionLinks?.length > 0
&& (
<tr>
<th>Links</th>
<td>
{projectData.discussionLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</td>
</tr>
)}
{projectData.issueLinks?.length > 0
&& (
<tr>
<th>Issues</th>
<td>
{projectData.issueLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</td>
</tr>
)}
</tbody>
</table>
</div>
);
}

Expand Down
4 changes: 3 additions & 1 deletion src/components/ProjectSummary/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.projecttable {
.projectsummary {
float: right;
clear: both;
font-family: monospace;
padding-left: 1rem;
}

0 comments on commit 1728241

Please sign in to comment.