Files
anomalyco__opentui/packages/react/jsx-namespace.d.ts
T
2026-03-12 15:45:55 +01:00

63 lines
1.3 KiB
TypeScript

import type * as React from "react"
import type {
AsciiFontProps,
BoxProps,
CodeProps,
DiffProps,
ExtendedIntrinsicElements,
InputProps,
LineBreakProps,
LineNumberProps,
LinkProps,
MarkdownProps,
OpenTUIComponents,
ScrollBoxProps,
SelectProps,
SpanProps,
TabSelectProps,
TextareaProps,
TextProps,
} from "./src/types/components.js"
export namespace JSX {
type Element = React.ReactNode
interface ElementClass extends React.Component<any> {
render(): React.ReactNode
}
interface ElementAttributesProperty {
props: {}
}
interface ElementChildrenAttribute {
children: {}
}
interface IntrinsicAttributes extends React.Attributes {}
interface IntrinsicElements extends React.JSX.IntrinsicElements, ExtendedIntrinsicElements<OpenTUIComponents> {
box: BoxProps
text: TextProps
span: SpanProps
code: CodeProps
diff: DiffProps
markdown: MarkdownProps
input: InputProps
textarea: TextareaProps
select: SelectProps
scrollbox: ScrollBoxProps
"ascii-font": AsciiFontProps
"tab-select": TabSelectProps
"line-number": LineNumberProps
// Text modifiers
b: SpanProps
i: SpanProps
u: SpanProps
strong: SpanProps
em: SpanProps
br: LineBreakProps
a: LinkProps
}
}