Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/FileManager/FileList/FileItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ const FileItem = ({
id={file.name}
checked={fileSelected}
className={`selection-checkbox ${checkboxClassName}`}
labelClassName={`selection-checkbox-label`}
onChange={handleCheckboxChange}
onClick={(e) => e.stopPropagation()}
/>
Expand Down
18 changes: 14 additions & 4 deletions frontend/src/FileManager/FileList/FileList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,15 @@
background-color: $item-hover-color;
}

.selection-checkbox {
.selection-checkbox-label {
position: absolute;
left: 5px;
top: 8px;
top: 0;
left: 0;
padding: 8px 5px;
}

.selection-checkbox {
position: static;
}

.hidden {
Expand Down Expand Up @@ -199,8 +204,13 @@
background-color: unset;
}

.selection-checkbox-label {
padding-top: 12px;
padding-bottom: 12px;
}

.selection-checkbox {
top: 12px;
position: static;
}

.file-name {
Expand Down
25 changes: 13 additions & 12 deletions frontend/src/components/Checkbox/Checkbox.jsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import "./Checkbox.scss";

const Checkbox = ({ name, id, checked, onClick, onChange, className = "", title, disabled = false }) => {
const Checkbox = ({ name, id, checked, onClick, onChange, className = "", labelClassName = "", title, disabled = false }) => {
return (
<input
className={`fm-checkbox ${className}`}
type="checkbox"
name={name}
id={id}
checked={checked}
onClick={onClick}
onChange={onChange}
title={title}
disabled={disabled}
/>
<label htmlFor={id} aria-label={`${name} checkbox`} onClick={onClick} className={labelClassName}>
<input
className={`fm-checkbox ${className}`}
type="checkbox"
name={name}
id={id}
checked={checked}
onChange={onChange}
title={title}
disabled={disabled}
/>
</label>
);
};

Expand Down