Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
verona-modules-aspect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IQB
verona-modules-aspect
Commits
58e8aaac
Commit
58e8aaac
authored
3 years ago
by
rhenck
Browse files
Options
Downloads
Patches
Plain Diff
Add proper label to textarea and reduce vertical space around text
parent
42b09cc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
projects/common/ui-elements/text-area/text-area.component.ts
+9
-3
9 additions, 3 deletions
projects/common/ui-elements/text-area/text-area.component.ts
projects/common/ui-elements/text-field/text-field.component.ts
+1
-1
1 addition, 1 deletion
...cts/common/ui-elements/text-field/text-field.component.ts
with
10 additions
and
4 deletions
projects/common/ui-elements/text-area/text-area.component.ts
+
9
−
3
View file @
58e8aaac
...
...
@@ -5,7 +5,8 @@ import { TextAreaElement } from './text-area-element';
@
Component
({
selector
:
'
app-text-area
'
,
template
:
`
<mat-form-field [style.width.%]="100"
<mat-form-field [ngClass]="{ 'no-label' : !elementModel.label}"
[style.width.%]="100"
[style.min-height.%]="100"
appInputBackgroundColor [backgroundColor]="elementModel.surfaceProps.backgroundColor"
[style.color]="elementModel.fontProps.fontColor"
...
...
@@ -15,8 +16,9 @@ import { TextAreaElement } from './text-area-element';
[style.font-style]="elementModel.fontProps.italic ? 'italic' : ''"
[style.text-decoration]="elementModel.fontProps.underline ? 'underline' : ''"
[appearance]="$any(elementModel.appearance)">
<mat-label *ngIf="elementModel.label">{{elementModel.label}}</mat-label>
<textarea matInput #input
autocomplete="off" rows="{{elementModel.rowCount}}"
placeholder="{{elementModel.label}}"
autocomplete="off" rows="{{elementModel.rowCount}}"
[formControl]="elementFormControl"
[value]="elementModel.value"
[readonly]="elementModel.readOnly"
...
...
@@ -30,7 +32,11 @@ import { TextAreaElement } from './text-area-element';
{{elementFormControl.errors | errorTransform: elementModel}}
</mat-error>
</mat-form-field>
`
`
,
styles
:
[
'
:host ::ng-deep div.mat-form-field-infix {padding-top: 0.2em;}
'
,
'
:host ::ng-deep .no-label .mat-form-field-outline-gap {border-top-color: unset !important}
'
]
})
export
class
TextAreaComponent
extends
FormElementComponent
{
@
Input
()
elementModel
!
:
TextAreaElement
;
...
...
This diff is collapsed.
Click to expand it.
projects/common/ui-elements/text-field/text-field.component.ts
+
1
−
1
View file @
58e8aaac
...
...
@@ -67,7 +67,7 @@ import { TextFieldElement } from './text-field-element';
</mat-form-field>
`
,
styles
:
[
'
::ng-deep app-text-field .small-input div.mat-form-field-infix {border-top: none; padding: 0.55em 0 0.25em 0;}
'
'
::ng-deep app-text-field .small-input div.mat-form-field-infix {border-top: none; padding: 0.55em 0 0.25em 0;}
'
// TODO
]
})
export
class
TextFieldComponent
extends
FormElementComponent
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment