setTabBarStyle

Requires:
MiniKit≥1.0.0@ray-js/ray≥0.3.23
Platforms:
iOSAndroid
import { setTabBarStyle } from '@ray-js/ray';

// Promise usage
try {
  const res = await setTabBarStyle({ ...params });
  console.log(res);
} catch (err) {
  console.log(err.errorMsg);
}

Method signature
setTabBarStyle(params: )

Description

Dynamically set the overall tabBar style

Parameters

PropertyTypeRequiredDescription
colorstringYesDefault text color on the tab
selectedColorstringYesText color when the tab is selected
backgroundColorstringYesTab background color
borderStylestringYesTop border color of the tabBar; supports only black/white
complete() => voidNoCompletion callback (executed on both success and failure)
success() => voidNoCallback on successful API call
fail(params: Object) => voidNoFailure callback
fail callback parameters
PropertyTypeDescription
errorMsgstringError message
errorCodestring | numberError code
Error extension

Return Value

None

Examples

import { setTabBarStyle } from '@ray-js/ray'

setTabBarStyle({
  color: "#999999",
  selectedColor: "#000000",
  backgroundColor: "#FFFFFF",
  borderStyle: "black",
  success: data => { console.log(data); },
  fail: error => { console.error(error); },
});