-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP pref dict component (working grid) #105
- Loading branch information
1 parent
f9a7178
commit a90c3b4
Showing
3 changed files
with
187 additions
and
9 deletions.
There are no files selected for viewing
20 changes: 19 additions & 1 deletion
20
src/lib/configuration/sz-preferences/sz-pref-dict/sz-pref-dict.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,21 @@ | ||
<div class="sz-pref-dict"> | ||
SzPrefDictComponent skeleton | ||
<div class="value-pair"> | ||
<div class="value-pair-header"> | ||
<div class="value-pair-header-cell">{{ keyTitle }}</div> | ||
<div class="value-pair-header-cell">{{ valueTitle }}</div> | ||
</div> | ||
</div> | ||
<div class="value-pair" *ngFor="let valuePair of valueAsArray"> | ||
<div class="value-pair-row"> | ||
<button class="button-del" (click)="deleteProperty(valuePair.name)">-</button> | ||
<input type="text "[id]="'dict-input-'+valuePair.name+'-key'" | ||
[placeholder]="keyPlaceholder" | ||
(change)="onKeyChange(valuePair.name, $event)" | ||
class="text value-pair-row-cell first-child" [value]="valuePair.name"/> | ||
<input type="text" [id]="'dict-input-'+valuePair.name+'-value'" | ||
(change)="onValueChange(valuePair.name, $event)" | ||
class="text value-pair-row-cell" [value]="valuePair.value"/> | ||
</div> | ||
</div> | ||
<button class="button-add" (click)="addProperty()">+</button> | ||
</div> |
66 changes: 65 additions & 1 deletion
66
src/lib/configuration/sz-preferences/sz-pref-dict/sz-pref-dict.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,70 @@ | ||
|
||
:host { | ||
border: 1px solid orange; | ||
border-radius: 3px; | ||
display: block; | ||
|
||
input[type=text], input.text { | ||
padding: 4px; | ||
border-radius: 0; | ||
border: 0; | ||
} | ||
|
||
.value-pair { | ||
display: block; | ||
|
||
.value-pair-header { | ||
background-color: #a5a5a5; | ||
display: flex; | ||
flex-wrap: nowrap; | ||
/* justify-content: flex-end;*/ | ||
flex-direction: row; | ||
align-content: space-around; | ||
justify-content: space-evenly; | ||
|
||
.value-pair-header-cell { | ||
border-right: 1px solid #5e5e5e; | ||
padding: 1px 8px 1px 8px; | ||
width: 50%; | ||
} | ||
.value-pair-header-cell:last-child { | ||
border-right: 0; | ||
} | ||
} | ||
|
||
.value-pair-row { | ||
display: flex; | ||
flex-wrap: nowrap; | ||
justify-content: flex-end; | ||
flex-direction: row; | ||
border-bottom: 1px solid #5e5e5e; | ||
margin-bottom: .3em; | ||
|
||
.button-del { | ||
width: 20px; | ||
} | ||
|
||
.value-pair-row-cell { | ||
border: 0; | ||
border-right: 1px solid #5e5e5e; | ||
padding: 1px 8px 1px 8px; | ||
width: 50%; | ||
} | ||
.value-pair-row-cell:first-child, | ||
.value-pair-row-cell.first-child { | ||
/* the first item should include space for button */ | ||
width: calc(50% - 21px); | ||
} | ||
.value-pair-row-cell:last-child { | ||
border-right: 0; | ||
} | ||
|
||
label { | ||
margin-right: .8em; | ||
} | ||
} | ||
.value-pair-row:last-child { | ||
margin-bottom: 0; | ||
border-bottom: 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters