@tempots/dom
OneOfTuple() function
Creates a tuple-based one-of component that matches a signal value with a set of cases.
The signal value should be a tuple with the first element being the key to match against.
Signature:
OneOfTuple: extends string, V>(match: Value<[T, V]>, cases: OneOfTupleOptions) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
match |
Value<[T, V]> |
The signal containing the value to match. |
cases |
The options for the one-of component. |
Returns: Renderable
The result of matching the signal value with the cases.