Skip to content

Commit 3b4ce2f

Browse files
authored
Merge pull request #522 from dedyf5/fix/mobile-subscribe-form-layout
fix(ui): improve mobile layout for subscribe form (#520)
2 parents 6a1ea03 + 82ab663 commit 3b4ce2f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/Form/index.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ const ErrorMessage = ({
3636
</div>
3737
);
3838

39-
const WIDTH = 180;
39+
const WIDTH = "50%";
40+
const MAX_WIDTH = 180;
4041
const HEIGHT = 70;
4142

4243
function SubscribeSection() {
@@ -205,12 +206,12 @@ export const Form = ({ fireInput }: { fireInput?: () => void }) => {
205206
placeholder="Your email address..."
206207
disabled={formState === STATES.LOADING || formState === STATES.SUCCESS}
207208
onChange={onChange}
208-
style={{ maxWidth: WIDTH, minHeight: HEIGHT }}
209+
style={{ width: WIDTH, maxWidth: MAX_WIDTH, minHeight: HEIGHT, textOverflow: "ellipsis" }}
209210
/>
210211
<button
211212
aria-label="Subscribe"
212213
className={clsx(
213-
"trans flex-shrink-0 rounded-r-full bg-center bg-no-repeat px-11 py-6 text-16 font-bold uppercase leading-none transition-colors duration-200 xl:py-4 md:px-5 md:py-3 sm:px-5 sm:py-3",
214+
"trans flex-shrink-0 rounded-r-full bg-center bg-no-repeat text-16 font-bold uppercase leading-none transition-colors duration-200",
214215
{
215216
"bg-[length:40px_40px] xl:bg-[length:28px_28px]":
216217
formState === STATES.LOADING,
@@ -221,7 +222,7 @@ export const Form = ({ fireInput }: { fireInput?: () => void }) => {
221222
},
222223
)}
223224
type="submit"
224-
style={{ width: WIDTH, minHeight: HEIGHT }}
225+
style={{ width: WIDTH, maxWidth: MAX_WIDTH, minHeight: HEIGHT }}
225226
>
226227
<span
227228
className={clsx({

0 commit comments

Comments
 (0)