API
Demo
@alinea/input.tabs
/**
Create tabs configuration
*/
export function
createTabs
<
T
extends
Array
<
TypeConfig
<
any
>
>
>
(
types
:
T
)
:
Section
<
UnionToIntersection
<
Type.Of
<
T
[
number
]
>
>
>
/**
Create a tab configuration
*/
export function
tab
<
T
extends
Array
<
Input
<
any
>
>
>
(
label
:
Label
,
sections
:
T
)
:
TypeConfig
<
Section.FieldsOf
<
T
[
number
]
>
>
/**
Create tabs configuration
*/
export function
tabs
<
T
extends
Array
<
TypeConfig
<
any
>
>
>
(
types
:
T
)
:
Section
<
UnionToIntersection
<
Type.Of
<
T
[
number
]
>
>
>
/**
Internal representation of tabs
*/
export class
TabsSection
<
T
>
extends
Section
<
T
>
{
constructor
<
T
>
(
types
:
Array
<
TypeConfig
<
any
>
>
)
:
TabsSection
<
T
>
fields
:
|
undefined
|
Fields
types
:
Array
<
TypeConfig
<
any
>
>
view
:
ComponentType
<
{
state
:
InputState
<
any
>
}
>
}