@tairu/jsx
Tairu JSX, exposing Tile components and a parser to convert the JSX elements to the JSON format.
Installation
npm install @tairu/jsx
Type Aliases
ActionElement
ActionElement:
OpenActionElement
|SignActionElement
|SubmitActionElement
BoxElement
BoxProps
BoxProps:
object
Type declaration
children?
optional
children:ReactNode
|BoxV0
|TextV0
| (BoxV0
|TextV0
)[]
style?
optional
style:BoxStyleV0
ImageElement
ImageElement:
ReactElement
<ImageProps
, typeofImage
>
ImageProps
ImageProps:
object
Type declaration
alt
alt:
string
height
height:
number
src
src:
string
width
width:
number
OpenActionElement
OpenActionElement:
ReactElement
<OpenActionProps
, typeofOpenAction
>
OpenActionProps
OpenActionProps:
object
Type declaration
label
label:
string
uri
uri:
string
OptionElement
OptionElement:
ReactElement
<OptionProps
, typeofOption
>
OptionProps
OptionProps:
InputOptionV0
OptionsInputElement
OptionsInputElement:
ReactElement
<OptionsInputProps
, typeofOptionsInput
>
OptionsInputProps
OptionsInputProps:
object
Type declaration
children
children:
OptionElement
|OptionElement
[]
multiple?
optional
multiple:boolean
SignActionElement
SignActionElement:
ReactElement
<SignActionProps
, typeofSignAction
>
SignActionProps
SignActionProps:
object
Type declaration
label
label:
string
payload?
optional
payload:Record
<string
,unknown
>
state?
optional
state:Record
<string
,unknown
>
SubmitActionElement
SubmitActionElement:
ReactElement
<SubmitActionProps
, typeofSubmitAction
>
SubmitActionProps
SubmitActionProps:
object
Type declaration
label
label:
string
state?
optional
state:Record
<string
,unknown
>
TextElement
TextInputElement
TextInputElement:
ReactElement
<TextInputProps
, typeofTextInput
>
TextInputProps
TextInputProps:
object
Type declaration
defaultValue?
optional
defaultValue:string
label
label:
string
placeholder?
optional
placeholder:string
secure?
optional
secure:boolean
TextProps
TextProps:
object
Type declaration
children
style?
optional
style:TextStyleV0
TileActionsProp
TileActionsProp:
ActionV0
|ActionElement
| (ActionV0
|ActionElement
)[]
TileElement
TileInputProp
TileInputProp:
InputV0
|OptionsInputElement
|TextInputElement
TileProps
TileProps:
BoxProps
&TileMetaV0
&object
Type declaration
actions?
optional
actions:TileActionsProp
input?
optional
input:TileInputProp
ValidTileInput
ValidTileInput:
ReactElement
|TileV0
Functions
Box()
Box(
props
):ReactElement
<BoxProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<BoxProps
, string
| JSXElementConstructor
<any
>>
Image()
Image(
props
):ReactElement
<ImageProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<ImageProps
, string
| JSXElementConstructor
<any
>>
OpenAction()
OpenAction(
props
):ReactElement
<OpenActionProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<OpenActionProps
, string
| JSXElementConstructor
<any
>>
Option()
Option(
props
):ReactElement
<object
,string
|JSXElementConstructor
<any
>>
Parameters
props
props.label
string
props.value
string
| number
| boolean
Returns
ReactElement
<object
, string
| JSXElementConstructor
<any
>>
label
label:
string
value
value:
string
|number
|boolean
OptionsInput()
OptionsInput(
props
):DOMElement
<OptionsInputProps
,Element
>
Parameters
props
Returns
DOMElement
<OptionsInputProps
, Element
>
parseTile()
parseTile(
root
):TileV0
Parameters
root
ReactElement
<any
, string
| JSXElementConstructor
<any
>>
Returns
SignAction()
SignAction(
props
):ReactElement
<SignActionProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<SignActionProps
, string
| JSXElementConstructor
<any
>>
SubmitAction()
SubmitAction(
props
):ReactElement
<SubmitActionProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<SubmitActionProps
, string
| JSXElementConstructor
<any
>>
Text()
Text(
props
):ReactElement
<TextProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<TextProps
, string
| JSXElementConstructor
<any
>>
TextInput()
TextInput(
props
):ReactElement
<TextInputProps
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<TextInputProps
, string
| JSXElementConstructor
<any
>>
Tile()
Tile(
props
):ReactElement
<BoxProps
&object
&object
,string
|JSXElementConstructor
<any
>>
Parameters
props
Returns
ReactElement
<BoxProps
& object
& object
, string
| JSXElementConstructor
<any
>>
toValidTile()
toValidTile(
input
):TileV0