-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(form-control): move background icons to element (#5531)
- Loading branch information
Showing
11 changed files
with
335 additions
and
423 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
5 changes: 0 additions & 5 deletions
5
src/patternfly/components/FormControl/examples/FormControl.css
This file was deleted.
Oops, something went wrong.
198 changes: 69 additions & 129 deletions
198
src/patternfly/components/FormControl/examples/FormControl.md
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="{{pfv}}form-control__icon{{#if form-control-icon--IsStatus}} pf-m-status{{/if}}{{#if form-control-icon--modifier}} {{form-control-icon--modifier}}{{/if}}" | ||
{{#if form-control-icon--attribute}} | ||
{{{form-control-icon--attribute}}} | ||
{{/if}}> | ||
<i class="fas fa-{{form-control--HasIcon}}" aria-hidden="true"></i> | ||
</div> |
16 changes: 16 additions & 0 deletions
16
src/patternfly/components/FormControl/form-control-select.hbs
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<select class="{{#if form-control-select--IsExpanded}} pf-m-expanded{{/if}}{{#if form-control-select--modifier}} {{form-control-select--modifier}}{{/if}}" | ||
{{#if form-control--IsDisabled}} disabled{{/if}} | ||
{{#if form-control--IsReadonly}} readonly{{/if}} | ||
{{#if form-control--IsRequired}} required{{/if}} | ||
{{#if form-control--attribute}} | ||
{{{form-control--attribute}}} | ||
{{/if}} | ||
>{{#if @partial-block}}{{> @partial-block}}{{/if}}</select> | ||
{{#> form-control-utilities}} | ||
{{#ifAny form-control--HasIcon form-control--IsError form-control--IsSuccess form-control--IsWarning}} | ||
{{> form-control-template-status}} | ||
{{/ifAny}} | ||
<div class="{{pfv}}form-control__toggle-icon"> | ||
<i class="fas fa-caret-down" aria-hidden="true"></i> | ||
</div> | ||
{{/form-control-utilities}} |
7 changes: 7 additions & 0 deletions
7
src/patternfly/components/FormControl/form-control-template-status.hbs
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{{#if form-control--IsSuccess}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='check-circle'}} | ||
{{else if form-control--IsWarning}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='exclamation-triangle'}} | ||
{{else if form-control--IsError}} | ||
{{> form-control-icon form-control-icon--IsStatus=true form-control--HasIcon='exclamation-circle'}} | ||
{{/if}} |
6 changes: 6 additions & 0 deletions
6
src/patternfly/components/FormControl/form-control-utilities.hbs
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="{{pfv}}form-control__utilities{{#if form-control-utilities--modifier}} {{form-control-utilities--modifier}}{{/if}}" | ||
{{#if form-control-utilities--attribute}} | ||
{{{form-control-utilities--attribute}}} | ||
{{/if}}> | ||
{{> @partial-block}} | ||
</div> |
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,5 +1,38 @@ | ||
<{{controlType}} class="{{pfv}}form-control{{#if form-control--IsExpanded}} pf-m-expanded{{/if}}{{#if form-control--modifier}} {{form-control--modifier}}{{/if}}" | ||
{{#if form-control--attribute}} | ||
{{{form-control--attribute}}} | ||
{{/if}} | ||
{{#if input}}>{{else}}>{{#if @partial-block}}{{> @partial-block}}{{/if}}</{{controlType}}>{{/if}} | ||
<div class="{{pfv}}form-control | ||
{{#if form-control--IsExpanded}} pf-m-expanded{{/if}} | ||
{{#if form-control--IsDisabled}} pf-m-disabled{{/if}} | ||
{{#if form-control--IsReadonly}} pf-m-readonly{{/if}} | ||
{{#if form-control--IsRequired}} pf-m-required{{/if}} | ||
{{#if form-control--IsPlaceholder}} pf-m-placeholder{{/if}} | ||
{{#if form-control--IsPlain}} pf-m-plain{{/if}} | ||
{{#if form-control--IsSuccess}} pf-m-success{{/if}} | ||
{{#if form-control--IsWarning}} pf-m-warning{{/if}} | ||
{{#if form-control--IsError}} pf-m-error{{/if}} | ||
{{#if form-control--HasIcon}} pf-m-icon{{/if}} | ||
{{#if form-control--modifier}} {{form-control--modifier}}{{/if}} | ||
"> | ||
{{#ifEquals controlType "select"}} | ||
{{> form-control-select}} | ||
{{else}} | ||
<{{controlType}} | ||
{{#if form-control--IsDisabled}} disabled{{/if}} | ||
{{#if form-control--IsReadonly}} readonly{{/if}} | ||
{{#if form-control--IsRequired}} required{{/if}} | ||
{{#if form-control--attribute}} | ||
{{{form-control--attribute}}} | ||
{{/if}} | ||
{{#if input}}>{{else}}>{{#if @partial-block}}{{> @partial-block}}{{/if}}</{{controlType}}>{{/if}} | ||
{{#ifAny form-control--HasIcon form-control--IsError form-control--IsSuccess form-control--IsWarning }} | ||
{{#> form-control-utilities}} | ||
{{#ifEquals form-control--HasIcon "clock"}} | ||
{{> form-control-icon}} | ||
{{else ifEquals form-control--HasIcon "calendar-alt"}} | ||
{{> form-control-icon}} | ||
{{else if form-control--HasIcon}} | ||
{{> form-control-icon}} | ||
{{/ifEquals}} | ||
{{> form-control-template-status}} | ||
{{/form-control-utilities}} | ||
{{/ifAny}} | ||
{{/ifEquals}} | ||
</div> |
Oops, something went wrong.