-
Notifications
You must be signed in to change notification settings - Fork 429
/
Copy pathglobal-header.d.ts
51 lines (51 loc) · 1.69 KB
/
global-header.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
declare module '@salesforce/design-system-react/components/global-header' {
import React from 'react';
type Props = {
/**
* **Assistive text for accessibility.**
* This object is merged with the default props object on every render.
* * `skipToNav`: The localized text that will be read back for the "Skip to Navigation" accessibility link.
* * `skipToContent`: The localized text that will be read back for the "Skip to Main Content" accessibility link.
*/
assistiveText?: Partial<{
skipToNav?: string;
skipToContent?: string;
}>;
/**
* See the component description, this accepts some combination of `SLDSGlobalHeaderSearch`, `SLDSGlobalHeaderButton`, `SLDSGlobalHeaderDropdown`, and `SLDSGlobalHeaderProfile` components.
*/
children?: React.ReactNode;
/**
* The Salesforce logo to display in the header.
*/
logoSrc?: string;
/**
* Pass in the Global Navigation Bar component
*/
navigation?: React.ReactNode;
/**
* Required for accessibility. Should jump the user to the primary content area.
*/
onSkipToContent?: (v: any) => any;
/**
* Required for accessibility. Should jump the user to the primary navigation.
*/
onSkipToNav?: (v: any) => any;
};
/**
* The global header is the anchor for the Salesforce platform and spans all other parts of the UI. It accepts children to define the items displayed within.
*
* Example:
* ```
* <SLDSGlobalHeader>
* <SLDSGlobalHeaderSearch />
* <SLDSGlobalHeaderButton />
* <SLDSGlobalHeaderDropdown />
* <SLDSGlobalHeaderDropdown />
* <SLDSGlobalHeaderProfile />
* </SLDSGlobalHeader>
* ```
*/
function Component(props: Props): JSX.Element;
export default Component;
}