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?
• __namedParameters?
• __namedParameters.crossAxis?: number
• __namedParameters.ignoreShift?: boolean
• __namedParameters.mainAxis?: number
• __namedParameters.rootBoundary?: object
| () => undefined
| object
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