ASC.People: ProfileAction: fix departments field

This commit is contained in:
Andrey Savihin 2019-09-10 18:02:12 +03:00
parent 456db5fb40
commit d128720a6f
4 changed files with 16 additions and 15 deletions

View File

@ -24,10 +24,11 @@ const DepartmentField = React.memo((props) => {
isDisabled={isDisabled}
title={addButtonTitle}
onClick={onAddDepartment}
className="department-add-btn"
/>
{departments && departments.map((department) => (
{departments && departments.map((department) => (
<SelectedItem
key={`department_${department.id}`}
key={`department_${department.id}`}
text={department.name}
onClose={() => { onRemoveDepartment(department.id) }}
isInline={true}

View File

@ -19,15 +19,15 @@ const MainContainer = styled.div`
}
}
.departments-field {
.field-body {
display: flex;
align-items: center;
.departments-field {
.department-add-btn {
margin: 0 8px 8px 0;
float: left;
}
.department-item {
margin: 0 8px 8px 0;
}
}
.department-item {
margin: 0 0 0 8px;
}
}
@media ${utils.device.tablet} {
flex-direction: column;

View File

@ -14,6 +14,7 @@ const horizontalCss = css`
line-height: 32px;
margin: 0;
width: 110px;
min-width: 110px;
}
.field-body {
flex-grow: 1;

View File

@ -8,11 +8,10 @@ const StyledButton = styled.div`
border: 1px solid #ECEEF1;
box-sizing: border-box;
border-radius: 3px;
height: 32px;
width: 32px;
padding: 8px;
display: inline-grid;
line-height: 32px;
height: 34px;
width: 34px;
padding: 9px;
display: inline-block;
cursor: ${props => !props.isDisabled ? "pointer" : "default"};
&:hover{