Skip to content

Commit

Permalink
Add click listener to course program
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSNGoodwin committed May 3, 2020
1 parent 62ee6c9 commit 32cf22c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/landing/CourseProgramCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface CourseProgramProps {
classTimeString: string;
}

const CourseProgramCard: React.FC<CourseProgramProps> = (props) => (
const CourseProgramCard: React.FC<CourseProgramProps & React.HTMLAttributes<HTMLDivElement>> = (props) => (
<div className="uk-card uk-card-default uk-card-body">
<div className="uk-grid-divider uk-grid-match" data-uk-grid>
<div className="uk-align-center uk-margin-remove uk-width-1-3@m">
Expand Down
4 changes: 4 additions & 0 deletions src/components/landing/Landing.scss
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ $l-breakpoint: 1200px;
}

.course-program-card {
li {
cursor: pointer;
}

.uk-slider {
@media screen and (max-width: $m-breakpoint - 1px) {
margin-left: 16px;
Expand Down
4 changes: 2 additions & 2 deletions src/components/landing/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ const Landing: React.FC<LandingProps> = (props) => {
<div className="uk-position-relative uk-visible-toggle uk-dark" data-tabindex="-1">
<ul className="uk-slider-items uk-child-width-1-1 uk-grid">
{props.courses.map((course) => (
<li key={course.id} >
<CourseProgramCard onClick={props.onCourseSelected(course.id)} {...course} />
<li key={course.id} onClick={() => props.onCourseSelected(course.id)}>
<CourseProgramCard {...props} {...course} />
</li>) )}
</ul>
<a className="uk-position-center-left uk-position-small uk-hidden-hover" href="#" data-uk-slidenav-previous data-uk-slider-item="previous"></a>
Expand Down

0 comments on commit 32cf22c

Please sign in to comment.