mirror of
https://github.com/kennethnym/jrx.git
synced 2026-03-20 03:41:18 +00:00
Bun React app with HMR that demonstrates jrx's render() pipeline. Shows JSX source, live UI via @json-render/react, and JSON output side by side. - example/specs/simple.tsx: flat Stack > Text + Button - example/specs/full.tsx: nested layout with state, events, visibility conditions, and watchers - Uses defineCatalog + defineRegistry from @json-render/react - Fix package.json exports to match actual tsup output (.js/.cjs instead of .mjs/.js) Co-authored-by: Ona <no-reply@ona.com>
24 lines
564 B
TypeScript
24 lines
564 B
TypeScript
import { jsx } from "jrx/jsx-runtime";
|
|
import type { JrxNode } from "jrx";
|
|
|
|
|
|
export function Stack(props: Record<string, unknown>): JrxNode {
|
|
return jsx("Stack", props);
|
|
}
|
|
|
|
export function Card(props: Record<string, unknown>): JrxNode {
|
|
return jsx("Card", props);
|
|
}
|
|
|
|
export function Text(props: Record<string, unknown>): JrxNode {
|
|
return jsx("Text", props);
|
|
}
|
|
|
|
export function Button(props: Record<string, unknown>): JrxNode {
|
|
return jsx("Button", props);
|
|
}
|
|
|
|
export function Input(props: Record<string, unknown>): JrxNode {
|
|
return jsx("Input", props);
|
|
}
|