Skip to content

BlockSuite API Documentation / @blocksuite/blocks / createButtonPopper

Function: createButtonPopper()

createButtonPopper(reference, popperElement, stateUpdated, mainAxis?, crossAxis?): object

Using attribute 'data-show' to control popper visibility.

css
selector {
  display: none;
}
selector[data-show] {
  display: block;
}

Parameters

reference: HTMLElement

popperElement: HTMLElement

stateUpdated= undefined

mainAxis?: number

crossAxis?: number

Returns

object

dispose()

dispose: () => void

Returns

void

hide()

hide: () => void

Returns

void

show()

show: () => void

Returns

void

toggle()

toggle: () => void

Returns

void

Source

packages/blocks/src/_common/utils/button-popper.ts:37