BlockSuite API Documentation / @blocksuite/blocks / createButtonPopper
Function: createButtonPopper()
createButtonPopper(
reference
,popperElement
,stateUpdated
?,__namedParameters
?):object
Using attribute 'data-show' to control popper visibility.
css
selector {
display: none;
}
selector[data-show] {
display: block;
}
Parameters
reference
HTMLElement
popperElement
HTMLElement
stateUpdated?
(state
) => void
__namedParameters?
crossAxis
number
ignoreShift
boolean
mainAxis
number
rootBoundary
{ height
: number
; width
: number
; x
: number
; y
: number
; } | () => undefined
| { height
: number
; width
: number
; x
: number
; y
: number
; }
Returns
object
dispose()
dispose: () =>
void
Returns
void
hide()
hide: () =>
void
Returns
void
show()
show: (
force
?) =>void
Parameters
force?
boolean
Returns
void
state
readonly
state:Display
toggle()
toggle: () =>
void
Returns
void
Defined in
packages/affine/shared/dist/utils/button-popper.d.ts:17