@tempots/dom
OneOfType() function
Creates a field that renders one of the provided cases based on the value of the type
property.
It uses the cases
object to determine the appropriate field to render based on the value of type
.
Signature:
OneOfType: extends {
type: string;
}>(match: Value, cases: OneOfTypeOptions) => Renderable
Parameters
Parameter |
Type |
Description |
---|---|---|
match |
The signal that contains the object with the | |
cases |
The options for rendering each case based on the |
Returns: Renderable
- The rendered field.