Finess for the add / edit groups forms. Is now pixel-perfect to mockup specs.

Added all post-function icon sprites to the app.
Remove FA icon from the form and used bg sprite for upload button.
Will match all other post / composer / widget ui buttons eventually.
This commit is contained in:
Dank Gabs 2019-07-25 00:27:58 -04:00
parent c1bf87b666
commit 493634aee5
4 changed files with 32 additions and 11 deletions

View File

@ -95,7 +95,7 @@ class Create extends React.PureComponent {
</div> </div>
<div> <div>
<label htmlFor='group_cover_image' className={classNames('group-form__file-label', { 'group-form__file-label--selected': coverImage !== null })}> <label htmlFor='group_cover_image' className={classNames('group-form__file-label', { 'group-form__file-label--selected': coverImage !== null })}>
<Icon id='camera' /> {intl.formatMessage(coverImage === null ? messages.coverImage : messages.coverImageChange)} {intl.formatMessage(coverImage === null ? messages.coverImage : messages.coverImageChange)}
</label> </label>
<input <input
type='file' type='file'

View File

@ -128,7 +128,7 @@ class Edit extends React.PureComponent {
<div> <div>
<label htmlFor='group_cover_image' className={classNames('group-form__file-label', { 'group-form__file-label--selected': coverImage !== null })}> <label htmlFor='group_cover_image' className={classNames('group-form__file-label', { 'group-form__file-label--selected': coverImage !== null })}>
<Icon id='camera' /> {intl.formatMessage(coverImage === null ? messages.coverImage : messages.coverImageChange)} {intl.formatMessage(coverImage === null ? messages.coverImage : messages.coverImageChange)}
</label> </label>
<input <input

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1,6 +1,12 @@
.group-form { .group-form {
padding: 20px; padding: 20px;
@include gab-container-standards(); @include gab-container-standards();
&,
div {
box-sizing: border-box;
float: left;
width: 100%;
}
input[type=text], input[type=text],
textarea { textarea {
&.standard { &.standard {
@ -8,18 +14,33 @@
margin: 0 0 10px; margin: 0 0 10px;
} }
} }
textarea {height: 88px;} textarea {
.group-form__file-label { float: left;
font-size: 13px; height: 88px;
color: $secondary-text-color; }
cursor: pointer; .group-form__file-label {
&:hover {color: $primary-text-color;} cursor: pointer;
.fa { display: block;
font-size: 18px; box-sizing: border-box;
margin-right: 5px; float: left;
transform: translatey(2px); height: 20px;
padding: 3px 0 0 33px;
@include font-size(12);
@include font-weight(light);
color: $gab-secondary-text;
background-repeat: no-repeat;
background-image: url('../images/sprite-post-functions.png');
background-size: 100px 1200px;
&:hover {
// dont forget the active icon state
color: $gab-brand-default;
background-position: 0 -100px;
}
&.group-form__file-label--selected {
// dont forget the active icon state
background-position: 0 -100px;
color: $gab-brand-default;;
} }
&.group-form__file-label--selected {color: $primary-text-color;}
} }
.group-form__file { .group-form__file {
width: 1px; width: 1px;