-
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.
[Logs UI][Metrics UI] Move actions to the kibana header (#84648)
Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
74bb155
commit f31e7c8
Showing
6 changed files
with
109 additions
and
47 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
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
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
25 changes: 25 additions & 0 deletions
25
x-pack/plugins/infra/public/utils/header_action_menu_provider.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,25 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import { AppMountParameters } from 'kibana/public'; | ||
|
||
interface ContextProps { | ||
setHeaderActionMenu?: AppMountParameters['setHeaderActionMenu']; | ||
} | ||
|
||
export const HeaderActionMenuContext = React.createContext<ContextProps>({}); | ||
|
||
export const HeaderActionMenuProvider: React.FC<Required<ContextProps>> = ({ | ||
setHeaderActionMenu, | ||
children, | ||
}) => { | ||
return ( | ||
<HeaderActionMenuContext.Provider value={{ setHeaderActionMenu }}> | ||
{children} | ||
</HeaderActionMenuContext.Provider> | ||
); | ||
}; |