Skip to content

Commit

Permalink
mobile stylings
Browse files Browse the repository at this point in the history
  • Loading branch information
steezeburger committed Sep 27, 2024
1 parent 4962e51 commit e44180c
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 19 deletions.
6 changes: 3 additions & 3 deletions web/src/components/DepositCard/DepositCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ export default function DepositCard(): React.ReactElement {
<div className="field">
<div className="is-flex is-flex-direction-column">
<div className="is-flex is-flex-direction-row is-align-items-center mb-3">
<div className="mr-5 w-70">From</div>
<div className="label-left">From</div>
<div className="is-flex-grow-1">
<Dropdown
placeholder="Select..."
Expand Down Expand Up @@ -285,7 +285,7 @@ export default function DepositCard(): React.ReactElement {

<div className="field">
<div className="is-flex is-flex-direction-row is-align-items-center">
<div className="mr-5 w-70">To</div>
<div className="label-left">To</div>
<div className="is-flex-grow-1">
<Dropdown
placeholder="Connect EVM Wallet"
Expand All @@ -306,7 +306,7 @@ export default function DepositCard(): React.ReactElement {

<div className="field">
<div className="is-flex is-flex-direction-row is-align-items-center">
<div className="mr-5 w-70">Amount</div>
<div className="label-left">Amount</div>
<div className="control mt-1 is-flex-grow-1">
<input
className="input is-medium"
Expand Down
14 changes: 7 additions & 7 deletions web/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,15 @@ function Dropdown<T>({
>
<span className="dropdown-item-inner is-size-6">
{option.leftIconClass && (
<span className="icon ml-1 mr-3">
<i className={option.leftIconClass} />
</span>
<span className="icon ml-1 mr-3">
<i className={option.leftIconClass} />
</span>
)}
<span className="dropdown-item-label">{option.label}</span>
<span className="dropdown-item-label is-text-overflow">{option.label}</span>
{option.rightIconClass && (
<span className="icon icon-right">
<i className={option.rightIconClass} />
</span>
<span className="icon icon-right">
<i className={option.rightIconClass} />
</span>
)}
</span>
</button>
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/WithdrawCard/WithdrawCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export default function WithdrawCard(): React.ReactElement {
<div className="field">
<div className="is-flex is-flex-direction-column">
<div className="is-flex is-flex-direction-row is-align-items-center mb-3">
<div className="mr-5 w-70">From</div>
<div className="label-left">From</div>
<div className="is-flex-grow-1">
<Dropdown
placeholder="Connect EVM Wallet"
Expand Down Expand Up @@ -266,7 +266,7 @@ export default function WithdrawCard(): React.ReactElement {
<div className="field">
<div className="is-flex is-flex-direction-column">
<div className="is-flex is-flex-direction-row is-align-items-center">
<div className="mr-5 w-70">To</div>
<div className="label-left">To</div>
<div className="is-flex-grow-1">
<Dropdown
placeholder="Select..."
Expand Down Expand Up @@ -298,7 +298,7 @@ export default function WithdrawCard(): React.ReactElement {

<div className="field">
<div className="is-flex is-flex-direction-row is-align-items-center">
<div className="mr-5 w-70">Amount</div>
<div className="label-left">Amount</div>
<div className="control mt-1 is-flex-grow-1">
<input
className="input is-medium"
Expand Down
8 changes: 4 additions & 4 deletions web/src/pages/BridgePage/BridgePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export default function BridgePage(): React.ReactElement {
return (
<section className="">
<div className="container px-2">
<div className="columns is-centered is-fullheight-with-navbar">
<div className="column is-12-mobile is-8-tablet">
<div className="card p-6">
<div className="tabs is-fullwidth is-medium">
<div className="columns is-centered is-vcentered is-fullheight-with-navbar">
<div className="column is-12-mobile is-8-tablet is-6-desktop">
<div className="card">
<div className="tabs is-fullwidth is-small">
<ul>
{tabs.map((tab) => (
<Tab
Expand Down
5 changes: 5 additions & 0 deletions web/src/styles/card-customizations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
}

.card {
padding: 3rem;
@include mobile {
padding: 1rem;
}

&.disabled {
opacity: 0.5;
pointer-events: none;
Expand Down
6 changes: 5 additions & 1 deletion web/src/styles/dropdown-customizations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@

.button {
width: 100%;
min-width: 0;
display: flex;
align-items: center;
background-color: transparent;
color: $dropdown-item-color;
justify-content: flex-start;

span {
color: $dropdown-placeholder-color;
Expand All @@ -25,10 +27,12 @@

&.icon-left {
height: 20px;
flex-shrink: 0;
}

&.icon-right {
margin-left: auto;
flex-shrink: 0;
}
}
}
Expand Down
11 changes: 10 additions & 1 deletion web/src/styles/form-customizations.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
@import './astria-colors';

div.control > input {
color: $astria-text-light;
color: $astria-text-light;
}

.field {
.label-left {
margin-right: 1rem;
min-width: 70px;
@include mobile {
min-width: 60px;
}
}
}
1 change: 1 addition & 0 deletions web/src/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -182,4 +182,5 @@ body {
.is-text-overflow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

0 comments on commit e44180c

Please sign in to comment.