Skip to content

Commit

Permalink
feat: new inputgroup component prepend & append
Browse files Browse the repository at this point in the history
  • Loading branch information
odb23 committed Jan 17, 2023
1 parent 140e253 commit fd21342
Showing 1 changed file with 32 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,35 @@
<span *ngIf="icon">
<CDBIcon [icon]="icon" [brand]="iconBrand" [regular]="iconRegular" [light]="iconLight"></CDBIcon>
</span>
<CDBInput
#CDBInput
[class]="inputClass"
[hint]="hint"
[type]="type"
[label]="label"
[labelClass]="labelClass"
[value]="value"
[size]="size"
[material]="material"
[background]="background"
[name]="name"
[disabled]="disabled"
[icon]="icon"
[iconBrand]="icon"
[iconLight]="iconLight"
[iconRegular]="iconRegular"
>
<div *ngIf="prepend" class="input-group-prepend">
<span #inputGroupPrepend class="input-group-text">{{ prepend }}</span>
</div>

<CDBInput #CDBInput [class]="inputClass" [hint]="hint" [type]="type" [label]="label" [labelClass]="labelClass"
[value]="value" [size]="size" [material]="material" [background]="background" [name]="name" [disabled]="disabled">
<div *ngIf="!prepend" #inputGroupPrepend class="input-group-prepend">
<ng-content select="[slot=cdbInputPrepend]"></ng-content>
</div>

<div *ngIf="prepend" class="input-group-prepend">
<span #inputGroupPrepend class="input-group-text">{{ prepend }}</span>
</div>
<div *ngIf="append" class="input-group-append">
<span #inputGroupAppend class="input-group-text">{{ append }}</span>
</div>

<div *ngIf="append" class="input-group-append">
<span #inputGroupAppend class="input-group-text">{{ append }}</span>
</div>
</CDBInput>
<div *ngIf="!append" #inputGroupAppend class="input-group-append">
<ng-content select="[slot=cdbInputAppend]"></ng-content>
</div>

</CDBInput>

0 comments on commit fd21342

Please sign in to comment.