Skip to content

Commit 27b647e

Browse files
vishalpolley-sureifyapollonian
authored andcommitted
Added CSS for mobile responsive site
1 parent a2fb9ad commit 27b647e

File tree

2 files changed

+70
-9
lines changed

2 files changed

+70
-9
lines changed

src/demo/index.jsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,10 @@ class Demo extends Component {
133133
<div className="view">
134134
<div className="card">
135135
<form onSubmit={this.handleSubmit}>
136-
<h2>Enter verification code</h2>
136+
<p>Enter verification code</p>
137137
<div className="margin-top--small">
138138
<OtpInput
139-
inputStyle={{
140-
width: '3rem',
141-
height: '3rem',
142-
margin: '0 1rem',
143-
fontSize: '2rem',
144-
borderRadius: 4,
145-
border: '1px solid rgba(0,0,0,0.3)',
146-
}}
139+
inputStyle="inputStyle"
147140
numInputs={numInputs}
148141
isDisabled={isDisabled}
149142
hasErrored={hasErrored}

src/demo/styles.css

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,69 @@ a {
2222
position: relative;
2323
}
2424

25+
.inputStyle {
26+
width: 3rem !important;
27+
height: 3rem;
28+
margin: 0 1rem;
29+
font-size: 2rem;
30+
border-radius: 4px;
31+
border: 1px solid rgba(0,0,0,0.3);
32+
}
33+
34+
@media only screen and (max-width: 678px) {
35+
.container {
36+
flex-wrap: wrap;
37+
flex-direction: column;
38+
}
39+
40+
.side-bar {
41+
width: 100%;
42+
display: flex;
43+
flex-direction: column;
44+
}
45+
46+
.side-bar__segment--header {
47+
text-align: center;
48+
}
49+
50+
.side-bar__segment--bottom {
51+
position: static !important;
52+
margin: 10px;
53+
}
54+
55+
label {
56+
display: block;
57+
float: left;
58+
width : 120px;
59+
}
60+
61+
.card {
62+
width: 100%;
63+
min-width: 120px !important;
64+
margin: 20px;
65+
}
66+
67+
.side-bar__segment > label > input[type='number'],
68+
.side-bar__segment > label > input[type='text'] {
69+
width: 180px !important;
70+
}
71+
72+
}
73+
74+
@media only screen and (max-width: 470px) {
75+
.margin-top--small .inputStyle {
76+
width: 2rem !important;
77+
height: 2rem;
78+
margin: 0 5px;
79+
font-size: 1rem;
80+
}
81+
82+
.card > form > p {
83+
font-size: 1.2em !important;
84+
}
85+
86+
}
87+
2588
.side-bar__segment {
2689
padding: 0.5rem 1rem;
2790
}
@@ -82,6 +145,11 @@ a {
82145
align-items: center;
83146
}
84147

148+
.card > form > p {
149+
font-size: 1.5em;
150+
font-weight: bold;
151+
}
152+
85153
input[type=number]::-webkit-inner-spin-button,
86154
input[type=number]::-webkit-outer-spin-button {
87155
-webkit-appearance: none;

0 commit comments

Comments
 (0)