web: People: Fixed font-weight in Group Name TextInput

This commit is contained in:
Alexey Safronov 2019-12-27 13:59:41 +03:00
parent 622ccc9f8a
commit 06afd70b7f
2 changed files with 13 additions and 3 deletions

View File

@ -273,6 +273,7 @@ class SectionBodyContent extends React.Component {
name="group-name"
scale={true}
isAutoFocussed={true}
isBold={true}
tabIndex={1}
value={groupName}
onChange={this.onGroupChange}

View File

@ -7,7 +7,7 @@ import isEqual from "lodash/isEqual";
/* eslint-disable no-unused-vars */
/* eslint-disable react/prop-types */
const Input = ({ isAutoFocussed, isDisabled, isReadOnly, hasError, hasWarning, scale, withBorder, keepCharPositions, ...props }) =>
const Input = ({ isAutoFocussed, isDisabled, isReadOnly, hasError, hasWarning, scale, withBorder, keepCharPositions, fontWeight, isBold, ...props }) =>
(props.mask != null) ? <MaskedInput keepCharPositions {...props}/> : <input {...props}/>;
/* eslint-enable react/prop-types */
/* eslint-enable no-unused-vars */
@ -45,6 +45,11 @@ const StyledInput = styled(Input).attrs((props) => ({
(props.size === 'big' && '16px') ||
(props.size === 'huge' && '18px')
};
font-weight: ${props => props.fontWeight
? props.fontWeight
: props.isBold ? 600 : 'normal'};
flex: 1 1 0%;
outline: none;
overflow: hidden;
@ -116,7 +121,10 @@ TextInput.propTypes = {
autoComplete: PropTypes.string,
className: PropTypes.string,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array])
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
fontWeight: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
isBold: PropTypes.bool,
}
TextInput.defaultProps = {
@ -130,7 +138,8 @@ TextInput.defaultProps = {
hasWarning: false,
autoComplete: 'off',
withBorder: true,
keepCharPositions: false
keepCharPositions: false,
isBold: false
}
export default TextInput