File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ export const setColorTheme = (sdkTheme: ColorTheme) => {
384
384
* To use, import processColor and pass to it with argument the color hex
385
385
* as argument.
386
386
* @param color A color to set the UI elements of the SDK to.
387
- * @platform iOS
387
+ * @deprecated Please migrate to the new UI customization API: { @link setTheme}
388
388
*/
389
389
export const setPrimaryColor = ( color : string ) => {
390
390
NativeInstabug . setTheme ( { primaryColor : color } ) ;
Original file line number Diff line number Diff line change 1
1
import '../mocks/mockInstabugUtils' ;
2
2
import '../mocks/mockNetworkLogger' ;
3
3
4
- import { findNodeHandle , Platform , processColor } from 'react-native' ;
4
+ import { findNodeHandle , Platform } from 'react-native' ;
5
5
import type { NavigationContainerRefWithCurrent } from '@react-navigation/native' ; // Import the hook
6
6
import { mocked } from 'jest-mock' ;
7
7
import waitForExpect from 'wait-for-expect' ;
@@ -458,10 +458,10 @@ describe('Instabug Module', () => {
458
458
it ( 'should call the native method setPrimaryColor on iOS' , ( ) => {
459
459
Platform . OS = 'ios' ;
460
460
const color = '#fff' ;
461
- Instabug . setPrimaryColor ( color ) ;
461
+ Instabug . setTheme ( { primaryColor : color } ) ;
462
462
463
- expect ( NativeInstabug . setPrimaryColor ) . toBeCalledTimes ( 1 ) ;
464
- expect ( NativeInstabug . setPrimaryColor ) . toBeCalledWith ( processColor ( color ) ) ;
463
+ expect ( NativeInstabug . setTheme ) . toBeCalledTimes ( 1 ) ;
464
+ expect ( NativeInstabug . setTheme ) . toBeCalledWith ( { primaryColor : color } ) ;
465
465
} ) ;
466
466
467
467
it ( 'should call the native method appendTags' , ( ) => {
You can’t perform that action at this time.
0 commit comments