Skip to content

Commit dd7fda8

Browse files
committed
Merge branch 'reskin-profile-settings' into reskin-missing-asterisk
2 parents 72d90de + aca0733 commit dd7fda8

File tree

8 files changed

+46
-17
lines changed

8 files changed

+46
-17
lines changed

src/shared/components/Settings/ExperienceAndSkills/WorkExperience/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -489,7 +489,7 @@ export default class Work extends ConsentComponent {
489489
name="industry"
490490
value={newWork.industry}
491491
onChange={this.onUpdateInput}
492-
placeholder="Select industry"
492+
placeholder="Enter industry"
493493
maxLength="64"
494494
/>
495495
</FormField>

src/shared/components/Settings/FormField/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import './styles.scss';
1010

1111
const FormField = ({
1212
children, label = '', disabled, style, required,
13+
children, label = '', disabled, style, isTextarea,
1314
}) => (
1415
<div styleName="form-field-wrapper" style={style}>
1516
<div styleName="form-field">
16-
<div styleName={cn('label', disabled ? 'disabled' : null)} role="presentation">
17+
<div styleName={cn('label', disabled ? 'disabled' : null, isTextarea)} role="presentation">
1718
{label}
1819
{ required && <span styleName="required">*</span> }
1920
</div>
@@ -28,6 +29,7 @@ FormField.defaultProps = {
2829
disabled: false,
2930
style: {},
3031
required: false,
32+
isTextarea: false,
3133
};
3234

3335
FormField.propTypes = {
@@ -36,6 +38,7 @@ FormField.propTypes = {
3638
disabled: PT.bool,
3739
style: PT.object,
3840
required: PT.bool,
41+
isTextarea: PT.bool,
3942
};
4043

4144
export default FormField;

src/shared/components/Settings/FormField/styles.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
color: $member-red;
3535
margin-left: 5px;
3636
}
37+
38+
&.isTextarea {
39+
top: 10px;
40+
}
3741
}
3842
}
3943
}

src/shared/components/Settings/FormInputTextArea/index.jsx

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,34 @@ import PT from 'prop-types';
88
import cn from 'classnames';
99
import './styles.scss';
1010

11-
const FormInputTextArea = ({ styleName, ...props }) => (
12-
<textarea
13-
type="text"
14-
styleName={cn('form-input-text-area', styleName || '')}
15-
{...props}
16-
/>
17-
);
11+
const FormInputTextArea = ({ styleName, ...props }) => {
12+
const { value } = props;
13+
14+
return (
15+
<div>
16+
<span styleName="char-count">
17+
{(value && value.length) || 0}
18+
<span styleName="grey">
19+
&nbsp;/ 240
20+
</span>
21+
</span>
22+
<textarea
23+
type="text"
24+
styleName={cn('form-input-text-area', styleName || '')}
25+
{...props}
26+
/>
27+
</div>
28+
);
29+
};
1830

1931
FormInputTextArea.defaultProps = {
2032
styleName: {},
33+
value: null,
2134
};
2235

2336
FormInputTextArea.propTypes = {
2437
styleName: PT.shape(),
38+
value: PT.string,
2539
};
2640

2741
export default FormInputTextArea;

src/shared/components/Settings/FormInputTextArea/styles.scss

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,17 @@
3131
box-shadow: none !important;
3232
}
3333
}
34+
35+
.char-count {
36+
@include roboto-regular;
37+
38+
position: absolute;
39+
right: 0;
40+
top: 10px;
41+
font-size: 11px;
42+
padding-right: 5px;
43+
}
44+
45+
.grey {
46+
color: $tc-gray-40;
47+
}

src/shared/components/Settings/ProfileSettings/AboutYou/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const AboutYou = (props) => {
3838
</FormField>
3939

4040
{/* Primary interests */}
41-
<FormField label="Short bio">
41+
<FormField label="Short bio" isTextarea>
4242
<FormInputTextArea
4343
disabled={!canModifyTrait}
4444
id="description"

src/shared/components/Settings/ProfileSettings/Learning/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ const Learning = (props) => {
160160
styleName="edit-text"
161161
onClick={onHandleAddEducation}
162162
>
163-
<AddItemIcon /> Add Another School / Degree
163+
<AddItemIcon /> Add School / Degree
164164
</span>
165165
)}
166166

src/shared/components/Settings/style.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -300,12 +300,6 @@ $checkbox-bg-selected: $tc-dark-blue;
300300
text-transform: none;
301301
}
302302

303-
.char-count {
304-
float: right;
305-
font-size: 11px;
306-
padding-right: 5px;
307-
}
308-
309303
.grey {
310304
color: $tc-gray-40;
311305
}

0 commit comments

Comments
 (0)