File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed
src/components/checkBoxList Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ export function CheckBoxList<T>({
16
16
onDragStart,
17
17
onDragEnd,
18
18
isDragDisable = false ,
19
+ sx,
19
20
...props
20
21
} : CheckboxListProps < T > ) {
21
22
const [ isDragging , setIsDragging ] = useState ( false ) ;
@@ -24,6 +25,7 @@ export function CheckBoxList<T>({
24
25
< CheckBoxListItems
25
26
isDndDragAndDropActive = { isDndDragAndDropActive }
26
27
isDragDisable = { isDragDisable || isDragging }
28
+ sx = { sx }
27
29
{ ...props }
28
30
/>
29
31
) ;
@@ -45,7 +47,7 @@ export function CheckBoxList<T>({
45
47
>
46
48
< Droppable droppableId = "droppable-checkbox-list" isDropDisabled = { isDragDisable } >
47
49
{ ( provided ) => (
48
- < Box { ...provided . droppableProps } ref = { provided . innerRef } >
50
+ < Box { ...provided . droppableProps } ref = { provided . innerRef } sx = { sx ?. dragAndDropContainer } >
49
51
{ checkBoxField }
50
52
{ provided . placeholder }
51
53
</ Box >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function CheckBoxListItem<T>({
24
24
return (
25
25
< ListItem
26
26
secondaryAction = { secondaryAction ?.( item , hover ) }
27
- sx = { { minWidth : 0 , ...sx ?. checkboxList } }
27
+ sx = { { minWidth : 0 , ...sx ?. checkboxListItem } }
28
28
onMouseEnter = { ( ) => setHover ( getItemId ( item ) ) }
29
29
onMouseLeave = { ( ) => setHover ( '' ) }
30
30
disablePadding = { ! isCheckboxClickableOnly }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export function CheckBoxListItems<T>({
95
95
) ;
96
96
97
97
return (
98
- < List key = "droppable-checkbox-list" dense disablePadding { ...props } >
98
+ < List key = "droppable-checkbox-list" sx = { sx ?. checkboxList } dense disablePadding { ...props } >
99
99
{ addSelectAllCheckbox && (
100
100
< ListItem
101
101
disablePadding
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function DraggableCheckBoxListItem<T>({
26
26
return (
27
27
< ListItem
28
28
secondaryAction = { secondaryAction ?.( item , hover ) }
29
- sx = { { minWidth : 0 , ...sx ?. checkboxList } }
29
+ sx = { { minWidth : 0 , ...sx ?. checkboxListItem } }
30
30
onMouseEnter = { ( ) => setHover ( getItemId ( item ) ) }
31
31
onMouseLeave = { ( ) => setHover ( '' ) }
32
32
disablePadding = { ! isCheckboxClickableOnly }
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ import { SxProps } from '@mui/system';
12
12
export interface CheckBoxListItemSxProps {
13
13
checkBoxIcon ?: SxProps ;
14
14
label ?: SxProps ;
15
- checkboxList ?: SxProps ;
15
+ checkboxListItem ?: SxProps ;
16
16
checkboxButton ?: SxProps ;
17
17
checkbox ?: SxProps ;
18
+ dragAndDropContainer ?: SxProps ;
19
+ checkboxList ?: SxProps ;
18
20
}
19
21
20
22
export interface CheckBoxListItemProps < T > {
You can’t perform that action at this time.
0 commit comments