Skip to content

Commit

Permalink
Merge branch 'develop' into feature/undo-gzip-messages
Browse files Browse the repository at this point in the history
  • Loading branch information
awildturtok authored Jan 22, 2024
2 parents 2acf37a + 068eac2 commit 4d3d99b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 12 deletions.
2 changes: 1 addition & 1 deletion frontend/src/js/button/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const SxBasicButton = styled(BasicButton)<{
opacity: 1;
background-color: ${({ frame, bgHover, theme }) =>
frame || bgHover ? theme.col.grayVeryLight : " inherit"};
frame || bgHover ? theme.col.bgAlt : " inherit"};
}
&:disabled {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,11 @@ const DropzoneList = <DroppableObject extends PossibleDroppableObject>(
/>
)}
<ListItem>
<StyledIconButton icon={faTimes} onClick={() => onDelete(i)} />
<StyledIconButton
bgHover
icon={faTimes}
onClick={() => onDelete(i)}
/>
{item}
</ListItem>
</ConceptContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,25 @@ interface PropsT {
}

const Container = styled.div`
padding: 4px;
display: flex;
flex-wrap: wrap;
gap: 8px;
`;

const AddBtn = styled(IconButton)``;

const RemoveBtn = styled(IconButton)`
position: absolute;
top: -5px;
top: -7px;
right: -7px;
opacity: 1;
z-index: 1;
background-color: white;
`;

const GroupItem = styled("div")`
padding: 2px 2px 2px 0;
position: relative;
margin: 0 5px 5px 0;
max-width: 200px;
`;

const DynamicInputGroup = ({
Expand Down Expand Up @@ -59,11 +61,18 @@ const DynamicInputGroup = ({
you can also just delete the following constraint:
*/}
{limit !== 1 && (
<RemoveBtn tiny icon={faTimes} onClick={() => onRemoveClick(idx)} />
<RemoveBtn
bgHover
tiny
icon={faTimes}
onClick={() => onRemoveClick(idx)}
/>
)}
</GroupItem>
))}
{limitNotReached && <AddBtn icon={faPlus} tiny onClick={onAddClick} />}
{limitNotReached && (
<IconButton bgHover icon={faPlus} tiny onClick={onAddClick} />
)}
</Container>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ interface Props {
rowPrefixFieldname?: string;
}

const DropzoneListItem = styled("div")``;

const Row = styled("div")`
display: flex;
align-items: center;
Expand Down Expand Up @@ -316,7 +314,7 @@ const FormConceptGroup = (props: Props) => {
);
}}
items={props.value.map((row, i) => (
<DropzoneListItem>
<div>
{props.renderRowPrefix
? props.renderRowPrefix({
value: props.value,
Expand Down Expand Up @@ -459,7 +457,7 @@ const FormConceptGroup = (props: Props) => {
),
)}
/>
</DropzoneListItem>
</div>
))}
/>
{isCopyModalOpen && (
Expand Down

0 comments on commit 4d3d99b

Please sign in to comment.