-
-
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.
- Loading branch information
Showing
7 changed files
with
55 additions
and
52 deletions.
There are no files selected for viewing
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,34 +1,23 @@ | ||
<h1>Input</h1> | ||
<p>Input is a form control element that can be used in forms.</p> | ||
<p>The input component allows the native HTML <code><input></code> element to work with the Form Field component.</p> | ||
|
||
<h2>Examples</h2> | ||
|
||
<h3>Basic</h3> | ||
<p>A basic input without using the <code>DaffFormFieldComponent</code>.</p> | ||
|
||
<design-land-example-viewer-container example="basic-input"></design-land-example-viewer-container> | ||
|
||
<h3>With <code>DaffFormFieldComponent</code></h3> | ||
<p>An input using <code>DaffFormField</code></p> | ||
<h2>Overview</h2> | ||
<p>The input component has the same functionality as a native HTML <code><input></code> element, with additional custom styling and functionality. It can't be used by itself and must be contained within a <code><daff-form-field⥸</code>.</p> | ||
|
||
<h2>Basic input with form field</h2> | ||
<design-land-example-viewer-container example="input-with-form-field"></design-land-example-viewer-container> | ||
|
||
<h3>Disabled</h3> | ||
<h2>Disabled input</h2> | ||
<p>The input in this example is disabled using the native HTML disabled attribute.</p> | ||
|
||
<design-land-example-viewer-container example="input-disabled"></design-land-example-viewer-container> | ||
|
||
<h3>Input With Hint</h3> | ||
<p>The input in this example has a hint.</p> | ||
|
||
<design-land-example-viewer-container example="input-hint"></design-land-example-viewer-container> | ||
|
||
<h3>With Reactive Forms</h3> | ||
<h2>Input with error messages</h2> | ||
<p>The input in this example uses the <code>ReactiveFormsModule</code> to display errors.</p> | ||
|
||
<design-land-example-viewer-container example="input-error"></design-land-example-viewer-container> | ||
|
||
<h3>Password With Reactive Forms</h3> | ||
<p>This is a special case where hints and errors for passwords are displayed.</p> | ||
<h3>Input with hint</h3> | ||
<p>The input in this example has a hint.</p> | ||
|
||
<design-land-example-viewer-container example="password-with-form-field"></design-land-example-viewer-container> | ||
<design-land-example-viewer-container example="input-hint"></design-land-example-viewer-container> |
2 changes: 1 addition & 1 deletion
2
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,6 +1,6 @@ | ||
<daff-form-field> | ||
<fa-icon [icon]="faUser" daffPrefix></fa-icon> | ||
<label daffFormLabel for="example-input">First Name</label> | ||
<input daff-input type="text" name="first-name" id="example-input" /> | ||
<input daff-input type="text" name="first-name" placeholder="First Name" id="example-input" /> | ||
<fa-icon [icon]="faCircleXmark" daffSuffix></fa-icon> | ||
</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
2 changes: 1 addition & 1 deletion
2
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,25 @@ | ||
# Input | ||
Input is a form control element that can be used in forms. | ||
The input component allows the native HTML `<input>` element to work with the [Form Field](/libs/design/src/atoms/form/form-field/README.md) component. | ||
|
||
## Examples | ||
|
||
### Basic | ||
A basic input without using the `DaffFormFieldComponent`. | ||
|
||
<design-land-example-viewer-container example="basic-input"></design-land-example-viewer-container> | ||
|
||
### With `DaffFormFieldComponent` | ||
An input using `DaffFormField` | ||
## Overview | ||
The input component has the same functionality as a native HTML `<input>` element, with additional custom styling and functionality. It can't be used by itself and must be contained within a `<daff-form-field>`. | ||
|
||
## Basic input with form field | ||
<design-land-example-viewer-container example="input-with-form-field"></design-land-example-viewer-container> | ||
|
||
### Disabled | ||
## Examples | ||
|
||
### Disabled input | ||
The input in this example is disabled using the native HTML disabled attribute. | ||
|
||
<design-land-example-viewer-container example="input-disabled"></design-land-example-viewer-container> | ||
|
||
### With Reactive Forms | ||
### Input with error messages | ||
The input in this example uses the `ReactiveFormsModule` to display errors. | ||
|
||
<design-land-example-viewer-container example="input-error"></design-land-example-viewer-container> | ||
<design-land-example-viewer-container example="input-error"></design-land-example-viewer-container> | ||
|
||
### Input with hint | ||
The input in this example has a hint. | ||
|
||
<design-land-example-viewer-container example="input-hint"></design-land-example-viewer-container> |