-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvtex.overlay-layout.d.ts
74 lines (73 loc) · 3.04 KB
/
vtex.overlay-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
import { Block } from '.'
declare global {
namespace JSX {
interface IntrinsicElements {
/**
* Declares a renderable children block responsible for triggering the `overlay-layout` content.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.overlay-layout}
*/
'overlay-trigger': Block<{
/**
* Defines whether the popover-layout will be opened by click (`click`) or hover (`hover`).
*
* @default "click"
*/
trigger?: 'click' | 'hover'
}>
/**
* Declares a renderable children block responsible for building the Overlay Layout content.
*
* @see {@link https://developers.vtex.com/docs/apps/vtex.overlay-layout}
*/
'overlay-layout': Block<{
/**
* Defines the Overlay Layout content placement when it is triggered according to the Trigger component positioning.
* Possible values are: `bottom`, `left`, `right` or `top`.
* If there is no page space in the placement that you choose, it will fit in a fallback position.
*
* @default "bottom"
*/
placement?: 'bottom' | 'left' | 'right' | 'top'
/**
* Defines the Overlay Layout content behavior when users try to scroll the page.
* Possible values are: `lock-page-scroll` (in which users can't scroll), `close-on-scroll` (the block is closed when users start scrolling) or `default` (Scroll does not affect the Overlay Layout content).
*
* @default "default"
*/
scrollBehavior?: 'lock-page-scroll' | 'close-on-scroll' | 'default'
/**
* Once the Overlay Layout content is rendered, it defines whether a backdrop overlay will be displayed (`visible`) or not (`none`).
* When set as visible, the backdrop will close Overlay Layout content when clicked on.
* Otherwise, the content will be closed only if any component from the page is clicked on.
*
* @default "none"
*/
backdrop?: 'visible' | 'none'
/**
* Whether an arrow pointing to the `overlay-trigger` component should be displayed on UI (`true`) or not (`false`).
*
* @default false
*/
showArrow?: boolean
/**
* Defines the `overlay-layout` component positioning when compared to the `overlay-trigger` (unit used is `px`).
* For more details, check out the `offsets` object table stated below.
*
* @default { skidding: 0, distance: 0 }
*/
offsets?: {
/**
* Defines the `overlay-layout` component positioning side by side with the `overlay-trigger`.
*/
skidding: number
/**
* Defines the distance between the `overlay-layout` and the `overlay-trigger` components in the UI.
* A positive number places the `overlay-layout` component farther, while a negative number lets it overlap the `overlay-trigger`.
*/
distance: number
}
}>
}
}
}