use of com.reactnativenavigation.params.SnackbarParams in project react-native-navigation by wix.
the class NavigationReactModule method showSnackbar.
@ReactMethod
public void showSnackbar(final ReadableMap params) {
SnackbarParams snackbarParams = new SnackbarParamsParser().parse(BundleConverter.toBundle(params));
NavigationCommandsHandler.showSnackbar(snackbarParams);
}
use of com.reactnativenavigation.params.SnackbarParams in project react-native-navigation by wix.
the class SnackbarParamsParser method parse.
public SnackbarParams parse(Bundle params) {
SnackbarParams result = new SnackbarParams();
result.text = params.getString("text");
result.textColor = getColor(params, "textColor", new StyleParams.Color(Color.WHITE));
result.buttonText = params.getString("actionText");
result.buttonColor = getColor(params, "actionColor", AppStyle.appStyle.snackbarButtonColor);
result.backgroundColor = getColor(params, "backgroundColor");
result.duration = getDuration(params.getString("duration", "short"));
result.eventId = params.getString("actionId");
return result;
}
Aggregations