Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the treasury responsive #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/Modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ const Modal = ({

{isOpen ? (
<div
className={`inline-block bg-bkg-2 ${background}
className={`inline-block bg-bkg-2 ${background} m-auto
rounded-lg text-left px-8 pt-6 pb-8 shadow-lg transform transition-all
sm:my-8 align-middle ${sizeClassName} w-full`}
>
Expand Down
4 changes: 2 additions & 2 deletions components/TreasuryAccount/AccountOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const StrategyCard = ({
currentDeposits.toFixed(2)
).toFormat()
return (
<div className="flex items-center justify-between p-4 mt-2 border rounded-md border-fgd-4">
<div className="flex flex-col sm:flex-row items-center justify-between p-4 mt-2 border rounded-md border-fgd-4">
<div className="flex items-center">
{strat.protocolLogoSrc ? (
<img
Expand Down Expand Up @@ -55,7 +55,7 @@ export const StrategyCard = ({
)}
</div>
</div>
<div className="flex items-center space-x-4">
<div className="flex items-center space-x-4 mt-5 sm:mt-0">
<div className="text-right">
{apy && <p className="text-xs">{apyHeader ?? 'Interest Rate'}</p>}
<p className="font-bold text-green">{apy}</p>
Expand Down
5 changes: 3 additions & 2 deletions components/treasuryV2/Details/MintDetails/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ export default function Header(props: Props) {
props.className,
'bg-bkg-1',
'gap-x-4',
'grid-cols-[1fr_max-content]',
'grid-cols-1',
'sm:grid-cols-[1fr_max-content]',
'grid',
'min-h-[128px]',
'px-8',
Expand Down Expand Up @@ -176,7 +177,7 @@ export default function Header(props: Props) {
</div>
)}
</div>
<div className="flex flex-col space-y-2 max-h-[128px] justify-center">
<div className="flex flex-col space-y-2 max-h-[128px] justify-center my-auto mx-auto mt-5">
<SecondaryButton
small={membership}
className="w-48"
Expand Down
5 changes: 3 additions & 2 deletions components/treasuryV2/Details/TokenDetails/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default function Header(props: Props) {
'py-4',
'gap-x-4',
'grid',
'grid-cols-[1fr_max-content]',
'grid-cols-1',
'sm:grid-cols-[1fr_max-content]',
'items-center'
)}
>
Expand Down Expand Up @@ -127,7 +128,7 @@ export default function Header(props: Props) {
</div>
<Address address={props.asset.address} className="ml-14 text-xs" />
</div>
<div className="flex flex-col space-y-2">
<div className="flex flex-col space-y-2 my-auto mx-auto sm:mt-0 mt-5">
{props.asset.raw.extensions.transferAddress ? (
<SecondaryButton
className="w-48"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default function AddAssetModal(props: Props) {
'gap-x-8',
'grid',
'justify-center',
isWallet(props.wallet) && 'grid-cols-[repeat(3,max-content)]'
'grid-cols-1',
isWallet(props.wallet) && 'sm:grid-cols-[repeat(3,max-content)]'
)}
>
<div className="flex flex-col items-center space-y-2">
Expand Down Expand Up @@ -102,7 +103,7 @@ export default function AddAssetModal(props: Props) {
</div>
{isWallet(props.wallet) && (
<div className="flex items-center justify-center">
<div className="text-lg text-fgd-1">OR</div>
<div className="text-lg text-fgd-1 m-5 sm:m-0">OR</div>
</div>
)}
{isWallet(props.wallet) && (
Expand Down
7 changes: 6 additions & 1 deletion components/treasuryV2/Details/WalletDetails/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ export default function Header(props: Props) {
'py-4',
'flex',
'items-center',
'justify-between'
'justify-between',
'flex-col',
'space-y-4',
'sm:flex-row',
'sm:space-y-0',
'sm:space-x-4'
)}
>
<div>
Expand Down
5 changes: 3 additions & 2 deletions pages/dao/[symbol]/treasury/v2/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default function Treasury() {
)}
/>
</header>
<article className="grid grid-cols-[458px_1fr] flex-grow gap-x-4">
<article className="grid grid-cols-1 sm:grid-cols-[458px_1fr] flex-grow gap-x-4">
<WalletList
className="w-full pt-9"
data={pipe(
Expand All @@ -100,7 +100,8 @@ export default function Treasury() {
}}
/>
<div>
<div className="text-lg pb-10">&nbsp;</div>
<div className="text-lg border-b border-gray-500 mb-2 mt-6 sm:hidden">Details</div>
<div className="text-lg pb-10 hidden sm:block">&nbsp;</div>
<div className="sticky top-0">
<div
className="h-[1px] top-[-1px] relative mb-[-1px]"
Expand Down
Loading