File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 1
1
import { useUIElementPositioning } from "@blocknote/react" ;
2
- import { OpenChangeReason , autoUpdate , offset , size } from "@floating-ui/react" ;
2
+ import {
3
+ OpenChangeReason ,
4
+ UseDismissProps ,
5
+ UseFloatingOptions ,
6
+ autoUpdate ,
7
+ offset ,
8
+ size ,
9
+ } from "@floating-ui/react" ;
3
10
import { useMemo } from "react" ;
4
11
// The block positioner automattically positions it's children below the block with `blockID`
5
12
export const BlockPositioner = ( props : {
@@ -11,6 +18,9 @@ export const BlockPositioner = (props: {
11
18
reason : OpenChangeReason ,
12
19
) => void ;
13
20
canDismissViaOutsidePress ?: boolean ;
21
+ floatingOptions ?: Partial <
22
+ UseFloatingOptions & { canDismiss : boolean | UseDismissProps }
23
+ > ;
14
24
} ) => {
15
25
const element = props . blockID
16
26
? document . querySelector ( `[data-id="${ props . blockID } "]` )
@@ -55,6 +65,7 @@ export const BlockPositioner = (props: {
55
65
} ) ;
56
66
return cleanup ;
57
67
} ,
68
+ ...props . floatingOptions ,
58
69
} ) ;
59
70
60
71
if ( ! isMounted ) {
You can’t perform that action at this time.
0 commit comments