-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
35 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
src/plugins/dashboard/public/dashboard_top_nav/dashboard_top_nav_with_context.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { DashboardAPIContext } from '../dashboard_app/dashboard_app'; | ||
import { DashboardContainer } from '../dashboard_container'; | ||
import { | ||
InternalDashboardTopNav, | ||
InternalDashboardTopNavProps, | ||
} from './internal_dashboard_top_nav'; | ||
export interface DashboardTopNavProps extends InternalDashboardTopNavProps { | ||
dashboardContainer: DashboardContainer; | ||
} | ||
|
||
export const DashboardTopNavWithContext = (props: DashboardTopNavProps) => ( | ||
<DashboardAPIContext.Provider value={props.dashboardContainer}> | ||
<InternalDashboardTopNav {...props} /> | ||
</DashboardAPIContext.Provider> | ||
); | ||
|
||
// eslint-disable-next-line import/no-default-export | ||
export default DashboardTopNavWithContext; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters