Skip to content

Commit eb89686

Browse files
fix: cp-7.60.0 predict claim button style (MetaMask#23153)
## **Description** Update text colour of Predict claim button in light theme. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: MetaMask#23096 ## **Manual testing steps** ## **Screenshots/Recordings** ### **Before** ### **After** <img width="300" alt="Claim" src="https://github.com/user-attachments/assets/cf4f7ecc-ba59-48c7-a6a9-88cff992c7c4" /> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Replace Predict claim CTA with ButtonHero and drop light-theme-specific button styling. > > - **Predict Claim Footer (`predict-claim-footer.tsx`)**: > - Replace `Button` with `ButtonHero`; move label to children, remove variant/label props. > - Set `size` to `ButtonBaseSize.Lg` and `isFullWidth`. > - Add imports for `ButtonHero` and `ButtonBaseSize`. > - **Styles (`predict-claim-footer.styles.ts`)**: > - Remove hardcoded `button` style and `lightTheme` dependency; keep container/top/bottom styles. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 44a2213. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 95b96ca commit eb89686

2 files changed

Lines changed: 9 additions & 18 deletions

File tree

app/components/Views/confirmations/components/predict-confirmations/predict-claim-footer/predict-claim-footer.styles.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { StyleSheet } from 'react-native';
22
import { Theme } from '../../../../../../util/theme/models';
3-
import { lightTheme } from '@metamask/design-tokens';
43

54
const styleSheet = (params: { theme: Theme }) =>
65
StyleSheet.create({
@@ -23,12 +22,6 @@ const styleSheet = (params: { theme: Theme }) =>
2322
bottom: {
2423
textAlign: 'center',
2524
},
26-
27-
button: {
28-
width: '100%',
29-
height: 48,
30-
backgroundColor: lightTheme.colors.primary.default,
31-
},
3225
});
3326

3427
export default styleSheet;

app/components/Views/confirmations/components/predict-confirmations/predict-claim-footer/predict-claim-footer.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ import Avatar, {
66
AvatarVariant,
77
} from '../../../../../../component-library/components/Avatars/Avatar';
88
import AvatarGroup from '../../../../../../component-library/components/Avatars/AvatarGroup';
9-
import Button, {
10-
ButtonVariants,
11-
} from '../../../../../../component-library/components/Buttons/Button';
129
import Text, {
1310
TextColor,
1411
TextVariant,
@@ -23,6 +20,8 @@ import { PredictPosition } from '../../../../../UI/Predict';
2320
import { AlignItems, FlexDirection } from '../../../../../UI/Box/box.types';
2421
import useFiatFormatter from '../../../../../UI/SimulationDetails/FiatDisplay/useFiatFormatter';
2522
import { BigNumber } from 'bignumber.js';
23+
import ButtonHero from '../../../../../../component-library/components-temp/Buttons/ButtonHero';
24+
import { ButtonBaseSize } from '@metamask/design-system-react-native';
2625

2726
export interface PredictClaimFooterProps {
2827
onPress: () => void;
@@ -51,15 +50,14 @@ export function PredictClaimFooter({ onPress }: PredictClaimFooterProps) {
5150
) : (
5251
<SingleWin wonPositions={wonPositions} />
5352
)}
54-
<Button
55-
variant={ButtonVariants.Primary}
56-
labelTextVariant={TextVariant.BodyLGMedium}
57-
style={styles.button}
58-
label={strings('confirm.predict_claim.button_label')}
59-
onPress={onPress}
60-
isInverse
53+
<ButtonHero
6154
testID={PredictClaimConfirmationSelectorsIDs.CLAIM_CONFIRM_BUTTON}
62-
/>
55+
onPress={onPress}
56+
size={ButtonBaseSize.Lg}
57+
isFullWidth
58+
>
59+
{strings('confirm.predict_claim.button_label')}
60+
</ButtonHero>
6361
<Text
6462
variant={TextVariant.BodyXS}
6563
color={TextColor.Alternative}

0 commit comments

Comments
 (0)