Skip to content

Commit

Permalink
Merge pull request #83 from PonderTeam/3-Edit-Button
Browse files Browse the repository at this point in the history
3 edit button
  • Loading branch information
JeremyLin003 authored Mar 11, 2024
2 parents c69054d + c3c35b3 commit 01f8ac1
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@


<body>
<div class = "body-div">
<div class = "upper-components">
<div class ="first-row">
<h1 class = "page-title">Create Study Set</h1>
<button mat-flat-button class = "done-button">Done</button>
</div>
<div class = "body-div">
<div class = "upper-components">
<div class ="first-row">
<h1 class = "page-title">Create Study Set</h1>
<button mat-flat-button class = "done-button" [routerLink]="['/viewStudySet']">Done</button>
</div>

<div class = "second-row">
<mat-form-field class = "study-set-title">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import { FormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { RouterLink } from '@angular/router';
import { CustomTabsModule } from '../custom-tabs/custom-tabs.module';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';

@Component({
selector: 'app-edit-create-study-set',
standalone: true,
imports: [CommonModule,MatButtonModule, MatInputModule,MatFormFieldModule,FormsModule,MatButtonToggleModule, CustomTabsModule, MatCardModule, MatIconModule],
imports: [CommonModule,MatButtonModule, MatInputModule,MatFormFieldModule,FormsModule,MatButtonToggleModule, CustomTabsModule, MatCardModule, MatIconModule, RouterLink],
templateUrl: './edit-create-study-set.component.html',
styleUrl: './edit-create-study-set.component.scss'
})
Expand Down
2 changes: 1 addition & 1 deletion src/app/studybuttonmenu/studybuttonmenu.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<section class ="study">
<button mat-flat-button [matMenuTriggerFor]="menu">
<button class="study-button"mat-flat-button [matMenuTriggerFor]="menu">
<mat-icon>arrow_drop_down</mat-icon> Study
</button>
<mat-menu #menu="matMenu">
Expand Down
2 changes: 1 addition & 1 deletion src/app/studybuttonmenu/studybuttonmenu.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@use '@angular/material-experimental' as matx;

@mixin theme($theme) {
.study {
.study-button {
width: 102px;
height: 40px;
}
Expand Down
6 changes: 5 additions & 1 deletion src/app/viewstudyset/viewstudyset.component.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
<div class = "view-header">
<div class="title">
<h1>Layers of OSI network Model</h1>
<button mat-flat-button class = "edit-button" [routerLink]="['/editCreateSet']">
<mat-icon>mode_edit</mat-icon>
Edit
</button>
<app-studybuttonmenu class ="study-button"></app-studybuttonmenu>
</div>
<p>description</p>
<p>description</p>
</div>
<div class="tabs">
<app-tabs>
Expand Down
9 changes: 9 additions & 0 deletions src/app/viewstudyset/viewstudyset.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,18 @@

.title{
display: flex;
flex-direction: row;
font: mat.get-theme-typography($theme, headline-large);
}

.edit-button{
color:mat.get-theme-color($theme,primary);
align-self: center;
height: 40px;
width: 102px;
margin-left: 16px;
}

.study-button {
align-self: center;
margin-left: auto;
Expand Down
6 changes: 4 additions & 2 deletions src/app/viewstudyset/viewstudyset.component.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { Component } from '@angular/core';
import {MatTabsModule} from '@angular/material/tabs';
import { MatCardModule } from '@angular/material/card';
import { StudybuttonmenuComponent } from '../studybuttonmenu/studybuttonmenu.component';
import { CustomTabsModule } from '../custom-tabs/custom-tabs.module';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
import { RouterLink } from '@angular/router';

@Component({
selector: 'app-viewstudyset',
standalone: true,
imports: [MatCardModule,MatTabsModule,StudybuttonmenuComponent, CustomTabsModule],
imports: [MatCardModule,StudybuttonmenuComponent, CustomTabsModule, MatIconModule, MatButtonModule, RouterLink],
templateUrl: './viewstudyset.component.html',
styleUrl: './viewstudyset.component.scss'
})
Expand Down

0 comments on commit 01f8ac1

Please sign in to comment.