1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-22 18:00:06 +01:00

mobile fixes

This commit is contained in:
Matthias Kretschmann 2023-11-01 22:56:35 +00:00
parent 810b763b80
commit 52087de19c
Signed by: m
GPG Key ID: 606EEEF3C479A91F
4 changed files with 44 additions and 15 deletions

View File

@ -1,12 +1,19 @@
.conversion { .conversion {
font-size: var(--font-size-mini); font-size: var(--font-size-mini);
color: var(--text-color-light); color: var(--text-color-light);
text-align: left; text-align: center;
margin-top: 0; margin-top: calc(var(--spacer) / 6);
margin-left: calc(var(--spacer) * 2.4);
animation: fadeIn 0.5s 0.8s ease-out backwards; animation: fadeIn 0.5s 0.8s ease-out backwards;
} }
@media screen and (min-width: 40rem) {
.conversion {
text-align: left;
margin-top: 0;
margin-left: calc(var(--spacer) * 2.4);
}
}
.conversion span { .conversion span {
margin-left: calc(var(--spacer) / 2); margin-left: calc(var(--spacer) / 2);
} }

View File

@ -4,11 +4,26 @@
animation: fadeIn 0.8s ease-out backwards; animation: fadeIn 0.8s ease-out backwards;
margin-top: calc(var(--spacer) / 3); margin-top: calc(var(--spacer) / 3);
display: flex; display: flex;
flex-direction: column;
min-height: 54px; min-height: 54px;
} }
@media (min-width: 40rem) {
.inputGroup {
flex-direction: row;
}
}
.inputWrap {
display: flex;
flex-direction: row;
align-items: center;
}
.token { .token {
width: 80px; width: 80px;
height: 100%;
min-height: 54px;
background: var(--box-background-color); background: var(--box-background-color);
border-top-left-radius: var(--border-radius); border-top-left-radius: var(--border-radius);
border-bottom-left-radius: var(--border-radius); border-bottom-left-radius: var(--border-radius);
@ -43,10 +58,13 @@
} }
.submit { .submit {
width: 100%; width: calc(100% - calc(var(--spacer) / 2) - 2px);
max-width: none;
border-top-left-radius: 0; border-top-left-radius: 0;
border-top-right-radius: 0; border-top-right-radius: 0;
border-color: var(--link-color); border-color: var(--link-color);
padding-left: calc(var(--spacer) / 4);
padding-right: calc(var(--spacer) / 4);
} }
@media (min-width: 40rem) { @media (min-width: 40rem) {

View File

@ -16,18 +16,21 @@ export function InputGroup({
return ( return (
<> <>
<div className={styles.inputGroup}> <div className={styles.inputGroup}>
<div className={styles.token}> <div className={styles.inputWrap}>
<TokenSelect /> <div className={styles.token}>
<TokenSelect />
</div>
<Input
type="text"
inputMode="decimal"
pattern="[0-9.]*"
value={amount}
placeholder="0.00"
onChange={(e) => setAmount(e.target.value)}
className={styles.inputInput}
/>
</div> </div>
<Input
type="text"
inputMode="decimal"
pattern="[0-9.]*"
value={amount}
placeholder="0.00"
onChange={(e) => setAmount(e.target.value)}
className={styles.inputInput}
/>
<button <button
className={`${styles.submit} btn btn-primary`} className={`${styles.submit} btn btn-primary`}
disabled={isDisabled || !amount} disabled={isDisabled || !amount}

View File

@ -38,6 +38,7 @@ export function TokenSelect() {
className="SelectTrigger" className="SelectTrigger"
disabled={isLoading} disabled={isLoading}
aria-label="Token" aria-label="Token"
placeholder="..."
> >
{isLoading ? <TokenLoading /> : <Select.Value />} {isLoading ? <TokenLoading /> : <Select.Value />}
<Select.Icon> <Select.Icon>