@kwiz/fluentui 1.0.219 → 1.0.220
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,11 +8,11 @@ interface iProps {
|
|
|
8
8
|
};
|
|
9
9
|
expectingDrop: boolean;
|
|
10
10
|
/** show the divider even when not hovering to drop */
|
|
11
|
-
|
|
11
|
+
showWhenNoDrop?: boolean;
|
|
12
12
|
/** use a different icon when not hovering to drop */
|
|
13
|
-
|
|
13
|
+
notDropIcon?: FluentIcon;
|
|
14
14
|
/** provide an on click handler when not hovering to drop */
|
|
15
|
-
|
|
15
|
+
noDropOnClick?: () => void;
|
|
16
16
|
}
|
|
17
17
|
/** use by passing a useDragDropContext with dropInfo, pass the props as-is <DropDivider {...dropContext} /> */
|
|
18
18
|
export declare function DropDivider(props: iProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,9 +16,9 @@ const useStyles = makeStyles({
|
|
|
16
16
|
/** use by passing a useDragDropContext with dropInfo, pass the props as-is <DropDivider {...dropContext} /> */
|
|
17
17
|
export function DropDivider(props) {
|
|
18
18
|
const classes = useStyles();
|
|
19
|
-
const NoOverIcon = useMemo(() => props.
|
|
19
|
+
const NoOverIcon = useMemo(() => props.notDropIcon || (props.vertical ? AddCircleRegular : MoreHorizontalRegular), [props.vertical, props.notDropIcon]);
|
|
20
20
|
return props.expectingDrop
|
|
21
21
|
? _jsx(DividerEX, { ref: props.drop.dropRef, className: mergeClasses(classes.dropDivider, props.drop && props.drop.isOver && classes.dropDividerOver), vertical: props.vertical, title: props.label || "insert here", children: props.vertical ? _jsx(MoreVerticalRegular, {}) : _jsx(MoreHorizontalRegular, {}) })
|
|
22
|
-
: props.
|
|
22
|
+
: props.showWhenNoDrop ? _jsx(DividerEX, { vertical: props.vertical, title: props.label || "insert here", onClick: props.noDropOnClick, children: _jsx(NoOverIcon, {}) }) : undefined;
|
|
23
23
|
}
|
|
24
24
|
//# sourceMappingURL=drop-divider.js.map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