BlockSuite API Documentation / @blocksuite/blocks / PeekViewService
Interface: PeekViewService
Methods
peek()
peek(pageRef)
peek(
pageRef
):Promise
<void
>
Peek a target element page ref info
Parameters
• pageRef
The page ref info to peek.
• pageRef.blockId?: string
• pageRef.docId: string
Returns
Promise
<void
>
A promise that resolves when the peek view is closed.
Defined in
packages/affine/components/dist/peek/type.d.ts:12
peek(target, template)
peek(
target
,template
?):Promise
<void
>
Peek a target element with a optional template
Parameters
• target: HTMLElement
The target element to peek. There are two use cases:
- If the template is not given, peek view content rendering will be delegated to the implementation of peek view service.
- To determine the origin of the peek view modal animation
• template?: TemplateResult
Optional template to render in the peek view modal. If not given, the peek view service will render the content.
Returns
Promise
<void
>
A promise that resolves when the peek view is closed.
Defined in
packages/affine/components/dist/peek/type.d.ts:24
peek(target, template)
peek<
Element
>(target
,template
?):Promise
<void
>
Peek a target element with a optional template
Type Parameters
• Element extends BlockComponent
<BlockModel
<object
, SignaledProps
<object
>>, BlockService
, string
>
Parameters
• target: Element
The target element to peek. There are two use cases:
- If the template is not given, peek view content rendering will be delegated to the implementation of peek view service.
- To determine the origin of the peek view modal animation
• template?: TemplateResult
Optional template to render in the peek view modal. If not given, the peek view service will render the content.
Returns
Promise
<void
>
A promise that resolves when the peek view is closed.
Defined in
packages/affine/components/dist/peek/type.d.ts:33