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>({
1616 onDragStart,
1717 onDragEnd,
1818 isDragDisable = false ,
19+ sx,
1920 ...props
2021} : CheckboxListProps < T > ) {
2122 const [ isDragging , setIsDragging ] = useState ( false ) ;
@@ -24,6 +25,7 @@ export function CheckBoxList<T>({
2425 < CheckBoxListItems
2526 isDndDragAndDropActive = { isDndDragAndDropActive }
2627 isDragDisable = { isDragDisable || isDragging }
28+ sx = { sx }
2729 { ...props }
2830 />
2931 ) ;
@@ -45,7 +47,7 @@ export function CheckBoxList<T>({
4547 >
4648 < Droppable droppableId = "droppable-checkbox-list" isDropDisabled = { isDragDisable } >
4749 { ( provided ) => (
48- < Box { ...provided . droppableProps } ref = { provided . innerRef } >
50+ < Box { ...provided . droppableProps } ref = { provided . innerRef } sx = { sx ?. dragAndDropContainer } >
4951 { checkBoxField }
5052 { provided . placeholder }
5153 </ Box >
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export function CheckBoxListItem<T>({
2424 return (
2525 < ListItem
2626 secondaryAction = { secondaryAction ?.( item , hover ) }
27- sx = { { minWidth : 0 , ...sx ?. checkboxList } }
27+ sx = { { minWidth : 0 , ...sx ?. checkboxListItem } }
2828 onMouseEnter = { ( ) => setHover ( getItemId ( item ) ) }
2929 onMouseLeave = { ( ) => setHover ( '' ) }
3030 disablePadding = { ! isCheckboxClickableOnly }
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ export function CheckBoxListItems<T>({
9595 ) ;
9696
9797 return (
98- < List key = "droppable-checkbox-list" dense disablePadding { ...props } >
98+ < List key = "droppable-checkbox-list" sx = { sx ?. checkboxList } dense disablePadding { ...props } >
9999 { addSelectAllCheckbox && (
100100 < ListItem
101101 disablePadding
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export function DraggableCheckBoxListItem<T>({
2626 return (
2727 < ListItem
2828 secondaryAction = { secondaryAction ?.( item , hover ) }
29- sx = { { minWidth : 0 , ...sx ?. checkboxList } }
29+ sx = { { minWidth : 0 , ...sx ?. checkboxListItem } }
3030 onMouseEnter = { ( ) => setHover ( getItemId ( item ) ) }
3131 onMouseLeave = { ( ) => setHover ( '' ) }
3232 disablePadding = { ! isCheckboxClickableOnly }
Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ import { SxProps } from '@mui/system';
1212export interface CheckBoxListItemSxProps {
1313 checkBoxIcon ?: SxProps ;
1414 label ?: SxProps ;
15- checkboxList ?: SxProps ;
15+ checkboxListItem ?: SxProps ;
1616 checkboxButton ?: SxProps ;
1717 checkbox ?: SxProps ;
18+ dragAndDropContainer ?: SxProps ;
19+ checkboxList ?: SxProps ;
1820}
1921
2022export interface CheckBoxListItemProps < T > {
You can’t perform that action at this time.
0 commit comments