-
Notifications
You must be signed in to change notification settings - Fork 429
/
Copy pathdropdown.d.ts
64 lines (63 loc) · 2.02 KB
/
dropdown.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
declare module '@salesforce/design-system-react/components/global-header/dropdown' {
import React from 'react';
type Props = {
/**
* Aligns the right or left side of the menu with the respective side of the trigger. This is not intended for use with `nubbinPosition`.
*/
align?: 'left' | 'right';
/**
* Extra classnames to apply to the dropdown menu.
*/
className?: string;
/**
* CSS classes to be added to `li` element.
*/
buttonClassName?: any[] | Record<string, any> | string;
/**
* Name of the icon. Visit <a href="http://www.lightningdesignsystem.com/resources/icons">Lightning Design System Icons</a> to reference icon names.
*/
iconName?: string;
/**
* For icon variants, please reference <a href="http://www.lightningdesignsystem.com/components/buttons/#icon">Lightning Design System Icons</a>.
*/
iconVariant?:
| 'bare'
| 'container'
| 'border'
| 'border-filled'
| 'more'
| 'global-header';
/**
* A unique ID is needed in order to support keyboard navigation, ARIA support, and connect the dropdown to the triggering button.
*/
id?: string;
/**
* Adds custom styling such as inverse fill and special sizing/spacing
*/
globalAction?: boolean;
/**
* Positions dropdown menu with a nubbin--that is the arrow notch. The placement options correspond to the placement of the nubbin. This is implemeted with CSS classes and is best used with a `Button` with "icon container" styling. Dropdown menus will still be contained to the closest scrolling parent.
*/
nubbinPosition?:
| 'top left'
| 'top'
| 'top right'
| 'bottom left'
| 'bottom'
| 'bottom right';
/**
* Offset adds pixels to the absolutely positioned dropdown menu in the format: ([vertical]px [horizontal]px).
*/
offset?: string;
/**
* Triggered when an item in the menu is clicked.
*/
onSelect?: (v: any) => any;
/**
* An array of menu item.
*/
options: any[] /*.isRequired*/;
};
function Component(props: Props): JSX.Element;
export default Component;
}