Skip to content

Commit

Permalink
#46 updated badge panel
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewNobes committed Nov 21, 2022
1 parent 4c0f6be commit 074630c
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 7 deletions.
22 changes: 22 additions & 0 deletions src/features/Projects/Project/BadgePanel/BadgePanel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { LanguageBadge, IssueCountBadge, LicenseBadge } from "./Badges";
import PropTypes from "prop-types";

export const BadgePanel = (props) => {
return (
<div>
<LanguageBadge language={props.primaryLanguage} />
<IssueCountBadge
issueCount={props.issueCount}
repoLink={props.repoLink}
/>
<LicenseBadge license={props.license} />
</div>
);
};

BadgePanel.propTypes = {
primaryLanguage: PropTypes.string.isRequired,
issueCount: PropTypes.number.isRequired,
repoLink: PropTypes.string.isRequired,
license: PropTypes.string.isRequired,
};
5 changes: 5 additions & 0 deletions src/features/Projects/Project/BadgePanel/Badges/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import IssueCountBadge from "./IssueCountBadge";
import LanguageBadge from "./LanguageBadge";
import LicenseBadge from "./LicenseBadge";

export { IssueCountBadge, LanguageBadge, LicenseBadge };
2 changes: 2 additions & 0 deletions src/features/Projects/Project/BadgePanel/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import { BadgePanel } from "./BadgePanel";
export default BadgePanel;
11 changes: 4 additions & 7 deletions src/features/Projects/Project/Project.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
import LanguageBadge from "./LanguageBadge";
import css from "./Project.module.css";
import ButtonPanel from "./ButtonPanel";
import IssueCountBadge from "./IssueCountBadge";
import LicenseBadge from "./LicenseBadge";
import ProjectTopicsList from "./ProjectTopicsList";
import PropTypes from "prop-types";
import BadgePanel from "./BadgePanel";

export const Project = (props) => {
return (
<div key={props.id} className={css.Project}>
<h2>{props.projectName}</h2>
<LanguageBadge language={props.primaryLanguage} />
<IssueCountBadge
<BadgePanel
primaryLanguage={props.primaryLanguage}
issueCount={props.issueCount}
repoLink={props.repoLink}
license={props.license}
/>
<LicenseBadge license={props.license} />

<p>{props.description}</p>
<ProjectTopicsList topics={props.topics} />
<ButtonPanel pagesLink={props.pagesLink} repoLink={props.repoLink} />
Expand Down

0 comments on commit 074630c

Please sign in to comment.