Commit 6bc3217 1 parent d56a56c commit 6bc3217 Copy full SHA for 6bc3217
File tree 4 files changed +18
-2
lines changed
components/src/components
components/suite/modals/ReduxModal/UserContextModal/UnstakeModal/UnstakeEthForm
4 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export const getIconColor = ({
48
48
49
49
switch ( variant ) {
50
50
case 'primary' :
51
- return theme . iconOnPrimary ;
51
+ return isSubtle ? theme . iconPrimaryDefault : theme . iconOnPrimary ;
52
52
case 'tertiary' :
53
53
return theme . iconOnTertiary ;
54
54
case 'info' :
@@ -117,8 +117,11 @@ export const useVariantStyle = (
117
117
const variantsColors : Record < ButtonVariant , Record < string , string | Colors > > = {
118
118
primary : {
119
119
background : theme . backgroundPrimaryDefault ,
120
+ backgroundSubtle : hexToRgba ( theme . backgroundPrimaryDefault , SUBTLE_ALPHA ) ,
120
121
backgroundHover : theme . backgroundPrimaryPressed ,
122
+ backgroundSubtleHover : hexToRgba ( theme . backgroundPrimaryDefault , SUBTLE_ALPHA_HOVER ) ,
121
123
text : theme . textOnPrimary ,
124
+ textSubtle : theme . textPrimaryDefault ,
122
125
} ,
123
126
tertiary : {
124
127
background : mapElevationToButtonBackground ( {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export type FractionButtonProps = {
9
9
children : React . ReactNode ;
10
10
tooltip ?: React . ReactNode ;
11
11
isDisabled ?: boolean ;
12
+ isSubtle ?: boolean ;
12
13
variant ?: ButtonVariant ;
13
14
onClick : ( ) => void ;
14
15
} ;
@@ -18,6 +19,7 @@ export const FractionButton = ({
18
19
children,
19
20
tooltip,
20
21
isDisabled,
22
+ isSubtle,
21
23
variant,
22
24
onClick,
23
25
} : FractionButtonProps ) => (
@@ -27,6 +29,7 @@ export const FractionButton = ({
27
29
type = "button"
28
30
size = "tiny"
29
31
isDisabled = { isDisabled }
32
+ isSubtle = { isSubtle }
30
33
onClick = { onClick }
31
34
>
32
35
{ children }
Original file line number Diff line number Diff line change @@ -44,6 +44,8 @@ export const Inputs = () => {
44
44
restakedReward = '0' ,
45
45
} = getStakingDataForNetwork ( account ) ?? { } ;
46
46
47
+ const isRewardsDisabled = restakedReward === '0' ;
48
+
47
49
const { symbol } = account ;
48
50
const networkDisplaySymbol = getNetworkDisplaySymbol ( symbol ) ;
49
51
@@ -172,15 +174,19 @@ export const Inputs = () => {
172
174
{
173
175
id : 'TR_FRACTION_BUTTONS_REWARDS' ,
174
176
children : < Translation id = "TR_FRACTION_BUTTONS_REWARDS" /> ,
175
- tooltip : (
177
+ tooltip : isRewardsDisabled ? (
178
+ < Translation id = "TR_STAKE_NO_REWARDS" />
179
+ ) : (
176
180
< Column alignItems = "flex-end" >
177
181
< FormattedCryptoAmount value = { restakedReward } symbol = { symbol } />
178
182
< Text variant = "primary" >
179
183
< FiatValue amount = { restakedReward } symbol = { symbol } />
180
184
</ Text >
181
185
</ Column >
182
186
) ,
187
+ isSubtle : true ,
183
188
variant : 'primary' ,
189
+ isDisabled : isRewardsDisabled ,
184
190
onClick : ( ) => onCryptoAmountChange ( restakedReward ) ,
185
191
} ,
186
192
] }
Original file line number Diff line number Diff line change @@ -8891,6 +8891,10 @@ export default defineMessages({
8891
8891
id : 'TR_STAKE_ONLY_REWARDS' ,
8892
8892
defaultMessage : 'Only rewards' ,
8893
8893
} ,
8894
+ TR_STAKE_NO_REWARDS : {
8895
+ id : 'TR_STAKE_NO_REWARDS' ,
8896
+ defaultMessage : 'No rewards available' ,
8897
+ } ,
8894
8898
TR_STAKE_UNSTAKED_AND_READY_TO_CLAIM : {
8895
8899
id : 'TR_STAKE_UNSTAKED_AND_READY_TO_CLAIM' ,
8896
8900
defaultMessage : 'Unstaked and ready to claim' ,
You can’t perform that action at this time.
0 commit comments