Skip to content

Commit

Permalink
Fix style issue in lists (#92)
Browse files Browse the repository at this point in the history
* style(list): Fix style issue in list item form

* fix(list): Disable button if form is not valid

* fix(list): Fix styling bug
  • Loading branch information
kilchenmann authored Sep 30, 2019
1 parent 6f2e474 commit 58b9855
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<kui-string-literal-input class="list-item-label" [placeholder]="placeholder" [value]="[]"
(dataChanged)="handleData($event)" [language]="language" (enter)="submitData()">
</kui-string-literal-input>
<button *ngIf="!loading" mat-icon-button matSuffix [disabled]="!labels && labels?.length === 0" class="add-node-btn"
<button *ngIf="!loading" mat-icon-button matSuffix [disabled]="!labels && !labels?.length" class="add-node-btn"
(click)="submitData()">
<mat-icon>
add
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@
}

.new-list-item {
display: inline-flex;
margin: 8px 0 0 40px;
width: 640px;
}
7 changes: 4 additions & 3 deletions src/app/project/list/list-item/list-item.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="list-node" *ngFor="let node of list; let first = first; let last = last;">

<!-- button to expand / close node -->
<button type="button" mat-icon-button (click)="toggleChildren(node.id)">
<button type="button" mat-icon-button (click)="toggleChildren(node.id)" class="">
<mat-icon class="mat-icon-rtl-mirror">
{{showChildren(node.id) ? 'expand_more' : 'chevron_right'}}
</mat-icon>
Expand Down Expand Up @@ -32,8 +32,9 @@
</div>

<!-- form to append new item to parent node -->
<app-list-item-form class="append-child-node" *ngIf="last" [parentIri]="parentIri" [projectIri]="projectIri"
[projectcode]="projectcode" [language]="language" (refreshParent)="updateView($event)">
<app-list-item-form class="list-node append-child-node" *ngIf="last" [parentIri]="parentIri"
[projectIri]="projectIri" [projectcode]="projectcode" [language]="language"
(refreshParent)="updateView($event)">
</app-list-item-form>

</div>
Expand Down
5 changes: 5 additions & 0 deletions src/app/project/list/list-item/list-item.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
margin: 12px 0 6px 0;
display: flex;
flex-wrap: wrap;
width: 640px;
}

.child-node {
margin-left: 24px;
}

.append-child-node {
margin-top: 0;
}

0 comments on commit 58b9855

Please sign in to comment.