(themes: any)
| 88 | }): { LightTheme: TLight; DarkTheme: TDark }; |
| 89 | // eslint-disable-next-line no-redeclare |
| 90 | export function adaptNavigationTheme(themes: any) { |
| 91 | const { |
| 92 | reactNavigationLight, |
| 93 | reactNavigationDark, |
| 94 | materialLight, |
| 95 | materialDark, |
| 96 | } = themes; |
| 97 | |
| 98 | const MD3Themes = { |
| 99 | light: materialLight || MD3LightTheme, |
| 100 | dark: materialDark || MD3DarkTheme, |
| 101 | }; |
| 102 | |
| 103 | const result: { LightTheme?: any; DarkTheme?: any } = {}; |
| 104 | |
| 105 | if (reactNavigationLight) { |
| 106 | result.LightTheme = getAdaptedTheme(reactNavigationLight, MD3Themes.light); |
| 107 | } |
| 108 | |
| 109 | if (reactNavigationDark) { |
| 110 | result.DarkTheme = getAdaptedTheme(reactNavigationDark, MD3Themes.dark); |
| 111 | } |
| 112 | |
| 113 | return result; |
| 114 | } |
| 115 | |
| 116 | const getAdaptedTheme = <T extends NavigationTheme>( |
| 117 | theme: T, |
no test coverage detected
searching dependent graphs…