Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,27 +25,6 @@ jest.mock(
},
);

// Mock HeaderCompactStandard
jest.mock(
'../../../../../component-library/components-temp/HeaderCompactStandard',
() => {
const ReactNative = jest.requireActual('react-native');
const { View, Text, TouchableOpacity } = ReactNative;

return {
__esModule: true,
default: (props: { title: string; onClose: () => void }) => (
<View testID="header-center">
<Text>{props.title}</Text>
<TouchableOpacity onPress={props.onClose} accessibilityLabel="Close">
<Text>Close</Text>
</TouchableOpacity>
</View>
),
};
},
);

// Mock InputStepper
jest.mock('../InputStepper', () => ({
InputStepper: jest.fn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ import React, { useCallback, useRef, useState } from 'react';
import BottomSheet, {
BottomSheetRef,
} from '../../../../../component-library/components/BottomSheets/BottomSheet';
import HeaderCompactStandard from '../../../../../component-library/components-temp/HeaderCompactStandard';
import { strings } from '../../../../../../locales/i18n';
import { View } from 'react-native';
import {
Button,
ButtonSize,
ButtonVariant,
HeaderStandard,
} from '@metamask/design-system-react-native';
import Keypad from '../../../../Base/Keypad';
import { InputStepper } from '../InputStepper';
Expand Down Expand Up @@ -97,9 +97,10 @@ export const CustomSlippageModal = () => {

return (
<BottomSheet ref={sheetRef}>
<HeaderCompactStandard
<HeaderStandard
title={strings('bridge.slippage')}
onClose={handleClose}
closeButtonProps={{ accessibilityLabel: 'Close' }}
Comment thread
brianacnguyen marked this conversation as resolved.
Outdated
/>
<View style={customSlippageModalStyles.stepperContainer}>
<InputStepper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,6 @@ jest.mock(
},
);

// Mock HeaderCompactStandard
jest.mock(
'../../../../../component-library/components-temp/HeaderCompactStandard',
() => {
const ReactNative = jest.requireActual('react-native');
const { View, Text, TouchableOpacity } = ReactNative;

return {
__esModule: true,
default: (props: { title: string; onClose: () => void }) => (
<View testID="header-center">
<Text>{props.title}</Text>
<TouchableOpacity onPress={props.onClose} accessibilityLabel="Close">
<Text>Close</Text>
</TouchableOpacity>
</View>
),
};
},
);

// Mock dependencies
jest.mock('./DefaultSlippageButtonGroup', () => ({
DefaultSlippageButtonGroup: jest.fn(({ options }) => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { useCallback, useRef, useState } from 'react';
import HeaderCompactStandard from '../../../../../component-library/components-temp/HeaderCompactStandard';
import BottomSheet, {
BottomSheetRef,
} from '../../../../../component-library/components/BottomSheets/BottomSheet';
Expand All @@ -9,6 +8,7 @@ import {
Button,
ButtonSize,
ButtonVariant,
HeaderStandard,
Text,
} from '@metamask/design-system-react-native';
import { DefaultSlippageButtonGroup } from './DefaultSlippageButtonGroup';
Expand Down Expand Up @@ -80,9 +80,10 @@ export const DefaultSlippageModal = () => {

return (
<BottomSheet ref={sheetRef}>
<HeaderCompactStandard
<HeaderStandard
title={strings('bridge.slippage')}
onClose={handleClose}
closeButtonProps={{ accessibilityLabel: 'Close' }}
/>
<View style={styles.descriptionContainer}>
<Text style={styles.descriptionText}>
Expand Down
Loading