1
1
import * as React from 'react'
2
2
import styled from 'styled-components'
3
3
import { Formik , Form } from 'formik'
4
+ import device from 'themes/device'
4
5
import { WithIntl } from 'components/localization'
5
6
import Layout from 'components/layout/layout'
6
7
import { Container , SEO } from 'components/containers'
@@ -13,6 +14,17 @@ import { getAppId } from 'common/websocket/config'
13
14
import { DerivStore } from 'store'
14
15
import { useLocalStorageState } from 'components/hooks/use-localstorage-state'
15
16
17
+ const StyledInput = styled ( Input ) `
18
+ & ~ label {
19
+ transform: translate(-0.6rem, -2rem) scale(0.7);
20
+ color: var(--color-black-3);
21
+ background-color: var(--color-${ ( props ) => props . background || 'grey-1' } );
22
+ @media ${ device . tabletL } {
23
+ top: 9px;
24
+ }
25
+ }
26
+ `
27
+
16
28
const StyledContainer = styled ( Container ) `
17
29
text-align: center;
18
30
height: 100vh;
@@ -73,9 +85,8 @@ const Endpoint = () => {
73
85
const [ server_url , setServerUrl ] = useLocalStorageState ( default_server_url , 'config.server_url' )
74
86
const [ app_id , setAppId ] = useLocalStorageState ( getAppId ( ) , 'config.app_id' )
75
87
const [ reset_loading , setResetLoading ] = React . useState ( false )
76
- const { website_status, setWebsiteStatus, website_status_loading } = React . useContext (
77
- DerivStore ,
78
- )
88
+ const { website_status, setWebsiteStatus, website_status_loading } =
89
+ React . useContext ( DerivStore )
79
90
const STATUS_TIMEOUT_DELAY = 1500
80
91
const RESET_TIMEOUT_DELAY = 500
81
92
@@ -161,7 +172,7 @@ const Endpoint = () => {
161
172
} ) => (
162
173
< Form noValidate >
163
174
< InputGroup >
164
- < Input
175
+ < StyledInput
165
176
name = "server_url"
166
177
error = { errors . server_url }
167
178
value = { values . server_url }
@@ -174,7 +185,7 @@ const Endpoint = () => {
174
185
background = "white"
175
186
placeholder = { 'e.g. green.binaryws.com' }
176
187
/>
177
- < Input
188
+ < StyledInput
178
189
name = "app_id"
179
190
error = { errors . app_id }
180
191
value = { values . app_id }
@@ -187,7 +198,7 @@ const Endpoint = () => {
187
198
background = "white"
188
199
placeholder = { 'e.g. 9999' }
189
200
/>
190
- < Input
201
+ < StyledInput
191
202
name = "clients_country"
192
203
error = { errors . clients_country }
193
204
value = { values . clients_country }
0 commit comments