Skip to content

Commit

Permalink
support to remove border left and right
Browse files Browse the repository at this point in the history
  • Loading branch information
wouter-willems committed Jul 26, 2023
1 parent b6ead27 commit f18d60f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion projects/demo/src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<klp-form [formGroup]="myForm">
<div style="height: 500px; overflow: auto">
<klp-form-element caption="Name" spaceDistribution="34-66">
<klp-form-text-input formControlName="name" [hasBorder]="false">
<klp-form-text-input formControlName="name" [hasBorderLeft]="false" [hasBorderRight]="false">
</klp-form-text-input>
</klp-form-element>
<klp-form-element caption="radioButtons" spaceDistribution="34-66">
Expand Down
2 changes: 1 addition & 1 deletion projects/klippa/ngx-enhancy-forms/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@klippa/ngx-enhancy-forms",
"version": "14.4.0",
"version": "14.5.0",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<input
[type]="type"
[(ngModel)]="innerValue"
[ngClass]="{showErrors: isInErrorState(), hasIcon: icon?.length > 0, hasClearButton: clearable, noBorder: !hasBorder}"
[ngClass]="{showErrors: isInErrorState(), hasIcon: icon?.length > 0, hasClearButton: clearable, noBorderLeft: !hasBorderLeft, noBorderRight: !hasBorderRight}"
(input)="setInnerValueAndNotify($event.target.value)"
[placeholder]="placeholder ? placeholder : ''"
(blur)="touch(); onBlur.emit()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ input {
&.hasClearButton {
padding-right: $spacing-large;
}
&.noBorder {
border: none;
&.noBorderLeft {
border-left: none;
}
&.noBorderRight {
border-right: none;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class TextInputComponent extends ValueAccessorBase<string> {
@Input() type: 'text' | 'password' = 'text';
@Input() clearable = false;
@Input() icon: 'search';
@Input() hasBorder = true;
@Input() hasBorderLeft = true;
@Input() hasBorderRight = true;
@Output() onBlur = new EventEmitter<void>();
}

0 comments on commit f18d60f

Please sign in to comment.