Skip to content
Snippets Groups Projects
Commit 40f095e0 authored by Scott Berg's avatar Scott Berg
Browse files

Create shared course component

parent 3bb455aa
No related branches found
No related tags found
No related merge requests found
Pipeline #28197 failed
<div class="course-item">
<div class="course-row course-info">
<p class="course-number">CHEM 641</p>
<p class="course-credits">3 Cr</p>
</div>
<div class="course-row">
<p class="course-title">Course Title Here</p>
</div>
</div>
.course-item {
position: relative;
display: block;
width: 100%;
padding: 10px;
box-sizing: border-box;
border: solid 1px white;
background-color: white;
border-radius: 5px;
font-family: "Helvetica Neue", Georgia, Helvetica, Arial, sans-serif;
font-size: 14px;
margin-bottom: 10px;
transition: border-color .25s ease, box-shadow .25s ease;
cursor: pointer;
&:hover {
border-color: #0679A8;
box-shadow: 0 1px 5px 1px rgba(0, 0, 0, .25)
}
&.disabled {
background-color: #C7CACB;
border-color: #C7CACB;
cursor: default;
box-shadow: none;
.course-credits,
.course-number,
.course-title {
font-weight: bold;
}
}
p {
margin: 0;
padding: 0;
}
}
.course-row {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
}
.course-number,
.course-credits {
display: inline-block;
}
.course-info {
margin-bottom: 5px;
}
.course-number {
font-weight: bold;
}
\ No newline at end of file
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { CourseItemComponent } from './course-item.component';
describe('CourseItemComponent', () => {
let component: CourseItemComponent;
let fixture: ComponentFixture<CourseItemComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ CourseItemComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(CourseItemComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
import { Component, OnInit } from '@angular/core';
import { Course } from '../../../core/models/course';
@Component({
selector: 'app-course-item',
templateUrl: './course-item.component.html',
styleUrls: ['./course-item.component.scss']
})
export class CourseItemComponent implements OnInit {
course: Course;
constructor() { }
ngOnInit() { }
}
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CourseItemComponent } from './course-item/course-item.component';
@NgModule({
imports: [ CommonModule ],
exports: [ CourseItemComponent ],
declarations: [ CourseItemComponent ]
})
export class SharedModule { }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment