mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[Fleet] Use theme service to display in Dark Mode when set on User Profile (#161819)
Closes https://github.com/elastic/kibana/issues/161135 ## What does this PR do? * Fixes the darkMode theme in fleet page. ## Issue References * https://github.com/elastic/kibana/issues/161135 ## Video/Screenshot Demo ##### Before   ###### FIX:   --- This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time. --------- Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev> Co-authored-by: gitstart_bot <gitstart_bot@users.noreply.github.com> Co-authored-by: Klinger Matheus <50892465+KlingerMatheus@users.noreply.github.com> Co-authored-by: Julia Bardi <90178898+juliaElastic@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
4540b38380
commit
39807919f0
2 changed files with 3 additions and 2 deletions
|
@ -255,7 +255,8 @@ export const FleetAppContext: React.FC<{
|
|||
theme$,
|
||||
fleetStatus,
|
||||
}) => {
|
||||
const isDarkMode = useObservable<boolean>(startServices.uiSettings.get$('theme:darkMode'));
|
||||
const darkModeObservable = useObservable(startServices.theme.theme$);
|
||||
const isDarkMode = darkModeObservable && darkModeObservable.darkMode;
|
||||
|
||||
return (
|
||||
<RedirectAppLinks application={startServices.application}>
|
||||
|
|
|
@ -59,7 +59,7 @@ describe('step select agent policy', () => {
|
|||
});
|
||||
|
||||
test('should not select agent policy by default if multiple exists', async () => {
|
||||
useGetAgentPoliciesMock.mockReturnValueOnce({
|
||||
useGetAgentPoliciesMock.mockReturnValue({
|
||||
data: {
|
||||
items: [
|
||||
{ id: 'policy-1', name: 'Policy 1' },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue