@tempots/dom

NotEmpty() function

Returns a renderable component that displays the given display component when the signal contains a non-empty array, and the whenEmpty component otherwise.

Signature:

NotEmpty: (value: Value, display: (value: Signal) => Renderable, whenEmpty?: () => Renderable) => Renderable

Parameters

Parameter

Type

Description

value

Value

The signal or literal containing the array.

display

(value: Signal) => Renderable

The component to display when the array is non-empty.

whenEmpty

() => Renderable

(Optional) The component to display when the array is empty.

Returns: Renderable

  • The renderable component.