1
1
import React from 'react'
2
- import styled from 'styled-components'
2
+ import styled , { css } from 'styled-components'
3
3
import { graphql , useStaticQuery } from 'gatsby'
4
4
import { SmallContainer , Ul } from '../components/_style'
5
5
import { SectionContainer , Show } from 'components/containers'
@@ -19,30 +19,22 @@ query {
19
19
}
20
20
`
21
21
22
- const ShowWrapper = styled . div `
23
- width:100%;
22
+ const container_style = css `
23
+ flex: 1;
24
+ width: 100%;
24
25
`
25
26
26
- const ExampleImage = styled ( QueryImage ) `
27
- margin:${ ( props ) => ( props . center ? '0 auto' : 'unset' ) } ;
28
- width: 792px;
29
- height: 453px;
30
-
31
- @media ${ device . laptop } {
32
- width: 630px;
33
- height: 361px;
34
- }
35
-
36
- @media ${ device . tabletL } {
37
- width:328px;
38
- height:506px;
39
- }
27
+ const Desktop = styled ( Show . Desktop ) `
28
+ ${ container_style }
29
+ `
40
30
41
- @media ${ device . mobileM } {
42
- width:289px;
43
- height:454px;
44
- }
31
+ const Mobile = styled ( Show . Mobile ) `
32
+ ${ container_style }
33
+ `
34
+ const ImageWrapper = styled . div `
35
+ width: 100%;
45
36
`
37
+
46
38
const StyledLinkButton = styled ( LinkButton ) `
47
39
padding: 1.2rem 1.5rem;
48
40
font-size: 14px;
@@ -167,14 +159,24 @@ const Policies = () => {
167
159
"Your trade will automatically close at 8,100, which is the nearest applicable market price to your stop loss level." ,
168
160
) }
169
161
</ Text >
170
- < Show . Desktop >
171
- < ExampleImage data = { data [ 'example' ] } />
172
- </ Show . Desktop >
173
- < ShowWrapper >
174
- < Show . Mobile width = "100%" >
175
- < ExampleImage data = { data [ 'example_mobile' ] } />
176
- </ Show . Mobile >
177
- </ ShowWrapper >
162
+
163
+ < Desktop max_width = { 'tabletS' } >
164
+ < ImageWrapper >
165
+ < QueryImage
166
+ data = { data [ 'example' ] }
167
+ alt = "Trade types Stop/Loss"
168
+ />
169
+ </ ImageWrapper >
170
+ </ Desktop >
171
+
172
+ < Mobile min_width = { 'tabletS' } >
173
+ < ImageWrapper >
174
+ < QueryImage
175
+ data = { data [ 'example_mobile' ] }
176
+ alt = "Trade types Stop/Loss"
177
+ />
178
+ </ ImageWrapper >
179
+ </ Mobile >
178
180
179
181
< Text size = "var(--text-size-m)" weight = "bold" mb = "0.8rem" mt = "2.4rem" >
180
182
{ localize ( 'Margin call' ) }
0 commit comments