Files
anomalyco__opentui/packages/react/jsx-namespace.d.ts
T
Matt Simpson 350d67b60c feat: add new code + textarea components (#268)
### Description

- added textarea component from core (_might need some work_)
- added code component from core
2025-11-05 12:28:20 +00:00

55 lines
1.1 KiB
TypeScript

import type * as React from "react"
import type {
AsciiFontProps,
BoxProps,
CodeProps,
ExtendedIntrinsicElements,
InputProps,
LineBreakProps,
OpenTUIComponents,
ScrollBoxProps,
SelectProps,
SpanProps,
TabSelectProps,
TextareaProps,
TextProps,
} from "./src/types/components"
export namespace JSX {
type Element = React.ReactNode
interface ElementClass extends React.ComponentClass<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
input: InputProps
textarea: TextareaProps
select: SelectProps
scrollbox: ScrollBoxProps
"ascii-font": AsciiFontProps
"tab-select": TabSelectProps
// Text modifiers
b: SpanProps
i: SpanProps
u: SpanProps
strong: SpanProps
em: SpanProps
br: LineBreakProps
}
}