@tempots/ui

ElementSize() function

Creates a renderable function that monitors the size of an element and provides it as a signal.

Signature:

ElementSize: (fn: (size: Signal<Size>) => TNode) => (ctx: DOMContext) => (removeTree: boolean) => void

Parameters

Parameter

Type

Description

fn

(size: Signal) => TNode

The renderable function that receives the size signal and returns a TNode.

Returns: (ctx: DOMContext) => (removeTree: boolean) => void

A function that takes a DOMContext and returns a renderable function.