-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtex.tab-layout.d.ts
92 lines (91 loc) · 2.87 KB
/
vtex.tab-layout.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
import { Block } from '.'
declare global {
namespace JSX {
interface IntrinsicElements {
/**
* Parent block that merely defines the logic (via its children blocks) for the layout structure, declaring the desired list of tabs and its content.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.tab-layout}
*/
'tab-layout': Block<{
/**
* ID of the desired tab to be rendered as the default one.
* If no value is provided, the first tab declared in the theme will be used as default.
*
* @default undefined
*/
defaultActiveTabId?: string
}>
/**
* Defines the list of tabs to be rendered.
* It only accepts the `tab-list.item` block as child.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.tab-layout}
*/
'tab-list': Block<
| {
$type?: undefined
}
| {
/**
* Defines the rendering for a given tab.
* Notice that it does not define the tab content, which is handled by the `tab-content.item` block.
*/
$type: 'item'
/**
* Tab ID of your choosing.
* It will be used to match the tab to its content (defined by the `tab-content.item` block).
*
* @default undefined
*/
tabId?: string
/**
* Defines the tab's text label.
*
* @default undefined
*/
label?: string
/**
* Defines the item as the default active tab.
*
* @default false
*/
defaultActiveTab?: boolean
}
| {
/**
* Flexible alternative to tab-list.item.
* Defines the rendering for a given tab and also accepts any array of blocks as its children.
*/
$type: 'item.children'
/**
* Tab ID of your choosing.
* It will be used to match the tab to a given content (defined by the `tab-content.item` block).
*
* @default undefined
*/
tabId?: string
}
>
/**
* Defines the list of content to be rendered in each tab.
* It only accepts the `tab-content.item` block as child.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.tab-layout}
*/
'tab-content': Block<{
/**
* Defines the content for a given tab.
*/
$type?: 'item'
/**
* Tab ID of your choosing.
* It will be used to match the content to a given tab (defined by the `tab-list.item` / `tab-list.item.children` blocks).
*
* @default undefined
*/
tabId?: string
}>
}
}
}