Types
JsxChild
Union type representing individual elements within JSX content
Overview
JsxChild represents a single element within JSX content.
type JsxChild = string | JsxElement | Variable;Union Members
| Type | Description | 
|---|---|
| string | Plain text content | 
| JsxElement | Structured element | 
| Variable | Dynamic placeholder | 
Examples
Basic Types
import { JsxChild, Variable } from 'generaltranslation';
// String
const text: JsxChild = "Welcome!";
// Variable
const name: JsxChild = { k: 'userName' } as Variable;
// Element
const link: JsxChild = {
  t: 'a',
  c: ['Click here']
};Related Types
- JsxChildren- Collections of JsxChild elements
- JsxElement- Structured elements
How is this guide?

