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) => {
384384 * To use, import processColor and pass to it with argument the color hex
385385 * as argument.
386386 * @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}
388388 */
389389export const setPrimaryColor = ( color : string ) => {
390390 NativeInstabug . setTheme ( { primaryColor : color } ) ;
Original file line number Diff line number Diff line change 11import '../mocks/mockInstabugUtils' ;
22import '../mocks/mockNetworkLogger' ;
33
4- import { findNodeHandle , Platform , processColor } from 'react-native' ;
4+ import { findNodeHandle , Platform } from 'react-native' ;
55import type { NavigationContainerRefWithCurrent } from '@react-navigation/native' ; // Import the hook
66import { mocked } from 'jest-mock' ;
77import waitForExpect from 'wait-for-expect' ;
@@ -458,10 +458,10 @@ describe('Instabug Module', () => {
458458 it ( 'should call the native method setPrimaryColor on iOS' , ( ) => {
459459 Platform . OS = 'ios' ;
460460 const color = '#fff' ;
461- Instabug . setPrimaryColor ( color ) ;
461+ Instabug . setTheme ( { primaryColor : color } ) ;
462462
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 } ) ;
465465 } ) ;
466466
467467 it ( 'should call the native method appendTags' , ( ) => {
You can’t perform that action at this time.
0 commit comments