Types
JsxElement
Typdefinition für strukturierte, HTML-ähnliche Elemente in übersetzbarem JSX-Inhalt
Überblick
JsxElement steht für strukturierte, HTML‑ähnliche Elemente in übersetzbarem JSX‑Inhalt.
type JsxElement = {
  t?: string;      // Tag-Name
  i?: number;      // id
  d?: GTProp;      // GT-Daten/Eigenschaften
  c?: JsxChildren; // children
};Eigenschaften
| Eigenschaft | Typ | Beschreibung | 
|---|---|---|
| t? | string | HTML-Tagname | 
| i? | number | Interne ID | 
| d? | GTProp | GT-Eigenschaften/Attribute | 
| c? | JsxChildren | Inhalt der Kindknoten | 
Häufig verwendete GT-Schlüssel
| GT-Schlüssel | HTML-Attribut | 
|---|---|
| pl | placeholder | 
| ti | title | 
| alt | alt | 
| arl | aria-label | 
Beispiele
Grundlegende Nutzung
import { JsxElement, Variable } from 'generaltranslation';
// Einfaches Element
const heading: JsxElement = {
  t: 'h1',
  c: ['Willkommen']
};
// Mit Attributen
const button: JsxElement = {
  t: 'button',
  d: { ti: 'Formular absenden' },
  c: ['Absenden']
};Verwandte Typen
- JsxChildren- Inhaltstyp für children
- JsxChild- Einzelne child-Elemente
Wie ist dieser Leitfaden?

