-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(design): add all basic form field inputs
- Loading branch information
1 parent
a8ea9b1
commit 6136791
Showing
9 changed files
with
107 additions
and
25 deletions.
There are no files selected for viewing
3 changes: 2 additions & 1 deletion
3
libs/design/input/examples/src/input-disabled/input-disabled.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,4 @@ | ||
<daff-form-field> | ||
<input disabled daff-input type="text" placeholder="Email" name="email" /> | ||
<input daff-input type="text" name="email" id="disabled-input" disabled/> | ||
<label for="disabled-input">Label</label> | ||
</daff-form-field> |
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
4 changes: 3 additions & 1 deletion
4
libs/design/input/examples/src/input-error/input-error.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,4 +1,6 @@ | ||
<daff-form-field> | ||
<input daff-input type="text" placeholder="Email" name="email" [formControl]="control" /> | ||
<input daff-input type="text" placeholder="Email" name="email" [formControl]="control" id="error-input"/> | ||
<label for="error-input">Label</label> | ||
<div class="error">Error message goes here.</div> | ||
</daff-form-field> | ||
<p>Value: {{ control.value }} </p> |
6 changes: 4 additions & 2 deletions
6
libs/design/input/examples/src/input-with-form-field/input-with-form-field.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,5 @@ | ||
<daff-form-field> | ||
<input daff-input type="text" placeholder="Email" name="email" /> | ||
</daff-form-field> | ||
<!-- <input daff-input type="text" placeholder="Email" name="email" [formControl]="control" id="input" /> --> | ||
<input daff-input type="text" name="email" [formControl]="control" id="input"/> | ||
<label for="input">Label</label> | ||
</daff-form-field> |
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
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
20 changes: 15 additions & 5 deletions
20
libs/design/src/atoms/form/form-field/form-field/form-field.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,7 +1,17 @@ | ||
<div class="daff-form-field__control" [class.daff-error]="isError" [class.daff-valid]="isValid" [class.daff-focus]="isFocused"> | ||
<ng-content></ng-content> | ||
<div class="daff-form-field__icon" *ngIf="_control.controlType === 'native-select'"> | ||
<fa-icon [icon]="faChevronDown"></fa-icon> | ||
</div> | ||
<div | ||
class="daff-form-field__control" | ||
[class.daff-focus]="isFocused" | ||
[class.daff-error]="isError" | ||
[class.daff-valid]="isValid" | ||
[class.daff-filled]="isFilled" | ||
[class.daff-disabled]="isDisabled" | ||
> | ||
<ng-content></ng-content> | ||
<div | ||
class="daff-form-field__icon" | ||
*ngIf="_control.controlType === 'native-select'" | ||
> | ||
<fa-icon [icon]="faChevronDown"></fa-icon> | ||
</div> | ||
</div> | ||
<ng-content select="daff-error-message"></ng-content> |
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
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