@@ -2,8 +2,9 @@ import styled, { css } from 'styled-components';
2
2
3
3
import { selectSelectedDevice } from '@suite-common/wallet-core' ;
4
4
import { SelectedAccountStatus } from '@suite-common/wallet-types' ;
5
- import { Row , variables } from '@trezor/components' ;
5
+ import { Row } from '@trezor/components' ;
6
6
import { hasBitcoinOnlyFirmware } from '@trezor/device-utils' ;
7
+ import { breakpointMediaQueries } from '@trezor/styles' ;
7
8
import { EventType , analytics } from '@trezor/suite-analytics' ;
8
9
import { spacings } from '@trezor/theme' ;
9
10
@@ -19,11 +20,22 @@ const ShowOnLargeDesktopWrapper = styled.div<{ $isActive?: boolean }>`
19
20
${ ( { $isActive } ) =>
20
21
$isActive &&
21
22
css `
22
- ${ variables . SCREEN_QUERY . BELOW_DESKTOP } {
23
+ ${ breakpointMediaQueries . below_xl } {
23
24
display : none;
24
25
}
25
26
` }
26
27
` ;
28
+
29
+ const ShowOnDesktopWrapper = styled . div < { $isActive ?: boolean } > `
30
+ ${ ( { $isActive } ) =>
31
+ $isActive &&
32
+ css `
33
+ ${ breakpointMediaQueries . below_lg } {
34
+ display : none;
35
+ }
36
+ ` }
37
+ ` ;
38
+
27
39
interface TradeActionsProps {
28
40
selectedAccount ?: SelectedAccountStatus ;
29
41
hideBuyAndSellBelowDesktop ?: boolean ;
@@ -79,20 +91,22 @@ export const TradeActions = ({
79
91
</ HeaderActionButton >
80
92
</ ShowOnLargeDesktopWrapper >
81
93
{ ! hasBitcoinOnlyFirmware ( device ) && (
82
- < HeaderActionButton
83
- icon = "arrowsLeftRight"
84
- onClick = { ( ) => {
85
- goToWithAnalytics ( 'wallet-trading-exchange' , {
86
- preserveParams : true ,
87
- } ) ;
88
- } }
89
- data-testid = "@wallet/menu/wallet-trading-exchange"
90
- variant = "tertiary"
91
- size = "small"
92
- isDisabled = { isAccountLoading }
93
- >
94
- < Translation id = "TR_TRADING_SWAP" />
95
- </ HeaderActionButton >
94
+ < ShowOnDesktopWrapper $isActive = { hideBuyAndSellBelowDesktop } >
95
+ < HeaderActionButton
96
+ icon = "arrowsLeftRight"
97
+ onClick = { ( ) => {
98
+ goToWithAnalytics ( 'wallet-trading-exchange' , {
99
+ preserveParams : true ,
100
+ } ) ;
101
+ } }
102
+ data-testid = "@wallet/menu/wallet-trading-exchange"
103
+ variant = "tertiary"
104
+ size = "small"
105
+ isDisabled = { isAccountLoading }
106
+ >
107
+ < Translation id = "TR_TRADING_SWAP" />
108
+ </ HeaderActionButton >
109
+ </ ShowOnDesktopWrapper >
96
110
) }
97
111
</ AppNavigationTooltip >
98
112
</ Row >
0 commit comments