diff --git a/app/components/UI/Navbar/index.js b/app/components/UI/Navbar/index.js
index 6b1aefeeebb..0bfb417eaf8 100644
--- a/app/components/UI/Navbar/index.js
+++ b/app/components/UI/Navbar/index.js
@@ -35,6 +35,9 @@ import Routes from '../../../constants/navigation/Routes';
import ButtonIcon, {
ButtonIconSizes,
} from '../../../component-library/components/Buttons/ButtonIcon';
+import Button, {
+ ButtonVariants,
+} from '../../../component-library/components/Buttons/Button';
import {
default as MorphText,
@@ -1672,83 +1675,41 @@ export function getFiatOnRampAggNavbar(
themeColors,
onCancel,
) {
- const innerStyles = StyleSheet.create({
- headerButtonText: {
- color: themeColors.primary.default,
- fontSize: scale(11),
- ...fontStyles.normal,
- },
- headerStyle: {
- backgroundColor: themeColors.background.default,
- shadowColor: importedColors.transparent,
- elevation: 0,
- },
- headerTitleStyle: {
- fontSize: 18,
- ...fontStyles.normal,
- color: themeColors.text.default,
- ...(!showBack && { textAlign: 'center' }),
- },
- });
- const headerTitle = title ?? 'Buy';
-
- const leftActionText = strings('navigation.back');
-
- const leftAction = () => navigation.pop();
-
- const navigationCancelText = strings('navigation.cancel');
-
return {
- headerTitle: () => (
-
+ header: () => (
+ navigation.pop()}
+ accessibilityRole="button"
+ accessible
+ />
+ )
+ }
+ endAccessory={
+ showCancel && (
+
),
- headerLeft: () => {
- if (!showBack) return ;
-
- return Device.isAndroid() ? (
-
-
-
- ) : (
-
- {leftActionText}
-
- );
- },
- headerRight: () => {
- if (!showCancel) return ;
- return (
- {
- navigation.dangerouslyGetParent()?.pop();
- onCancel?.();
- }}
- style={styles.closeButton}
- accessibilityRole="button"
- accessible
- >
-
- {navigationCancelText}
-
-
- );
- },
- headerStyle: innerStyles.headerStyle,
- headerTitleStyle: innerStyles.headerTitleStyle,
};
}