Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit bec29b8

Browse files
fix: input for endpoint page (#1964)
Co-authored-by: mustofa-binary <[email protected]>
1 parent d4af3a9 commit bec29b8

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/pages/endpoint/index.js

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import * as React from 'react'
22
import styled from 'styled-components'
33
import { Formik, Form } from 'formik'
4+
import device from 'themes/device'
45
import { WithIntl } from 'components/localization'
56
import Layout from 'components/layout/layout'
67
import { Container, SEO } from 'components/containers'
@@ -13,6 +14,17 @@ import { getAppId } from 'common/websocket/config'
1314
import { DerivStore } from 'store'
1415
import { useLocalStorageState } from 'components/hooks/use-localstorage-state'
1516

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+
1628
const StyledContainer = styled(Container)`
1729
text-align: center;
1830
height: 100vh;
@@ -73,9 +85,8 @@ const Endpoint = () => {
7385
const [server_url, setServerUrl] = useLocalStorageState(default_server_url, 'config.server_url')
7486
const [app_id, setAppId] = useLocalStorageState(getAppId(), 'config.app_id')
7587
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)
7990
const STATUS_TIMEOUT_DELAY = 1500
8091
const RESET_TIMEOUT_DELAY = 500
8192

@@ -161,7 +172,7 @@ const Endpoint = () => {
161172
}) => (
162173
<Form noValidate>
163174
<InputGroup>
164-
<Input
175+
<StyledInput
165176
name="server_url"
166177
error={errors.server_url}
167178
value={values.server_url}
@@ -174,7 +185,7 @@ const Endpoint = () => {
174185
background="white"
175186
placeholder={'e.g. green.binaryws.com'}
176187
/>
177-
<Input
188+
<StyledInput
178189
name="app_id"
179190
error={errors.app_id}
180191
value={values.app_id}
@@ -187,7 +198,7 @@ const Endpoint = () => {
187198
background="white"
188199
placeholder={'e.g. 9999'}
189200
/>
190-
<Input
201+
<StyledInput
191202
name="clients_country"
192203
error={errors.clients_country}
193204
value={values.clients_country}

0 commit comments

Comments
 (0)