Skip to content

Commit

Permalink
fix: improve responsive display
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Mar 7, 2024
1 parent 8de4d65 commit 4721544
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 12 deletions.
4 changes: 3 additions & 1 deletion src/features/staking/components/delegation-details.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@ export const DetailsTrigger = ({
const gridStyle = {
gap: "16px",
gridTemplateColumns: "60px 1.5fr repeat(4, 1fr)",
minWidth: 800,
overflow: "auto",
};

const rowStyle =
"grid w-full items-center justify-between gap-2 p-2 mb-[24px] last:mb-[0px] bg-black rounded-[8px]";

const wrapperStyle =
"w-full overflow-hidden rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]";
"w-full overflow-auto rounded-[24px] bg-bg-600 pb-4 text-typo-100 px-[16px]";

const Menu = () => (
<span
Expand Down
4 changes: 2 additions & 2 deletions src/features/staking/components/divisor.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const DivisorHorizontal = () => (
<div className="h-[1px] w-full bg-bg-400" />
export const DivisorHorizontal = ({ className }: { className?: string }) => (
<div className={["h-[1px] w-full bg-bg-400", className || ""].join(" ")} />
);

export const DivisorVertical = () => (
Expand Down
6 changes: 3 additions & 3 deletions src/features/staking/components/validator-delegation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default function ValidatorDelegation() {
const canShowDetail = getCanShowDetails(staking.state);

const content = !isConnected ? (
<div className="flex h-[220px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase">
<div className="flex h-[220px] min-w-[1000px] flex-col items-center justify-center gap-[32px] rounded-[24px] bg-bg-600 uppercase">
<HeroText>Please log in to view</HeroText>
<div>
<Button
Expand All @@ -89,7 +89,7 @@ export default function ValidatorDelegation() {
</div>
</div>
) : (
<div className="grid grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]">
<div className="grid min-w-[1000px] grid-cols-4 rounded-[24px] bg-bg-600 p-[24px]">
<div className="relative">
<Heading8>Claimable Rewards</Heading8>
<div className="mb-[8px] mt-[12px] flex flex-row items-center gap-[8px]">
Expand Down Expand Up @@ -180,7 +180,7 @@ export default function ValidatorDelegation() {
/>
)}
</div>
{content}
<div className="w-full overflow-auto">{content}</div>
{canShowDetail && isShowingDetails && <DelegationDetails />}
</>
);
Expand Down
12 changes: 6 additions & 6 deletions src/features/staking/components/validator-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,14 @@ export default function ValidatorPage() {
<span>{validatorDetails.description.moniker}</span>
</div>
<div
className="flex flex-col gap-[24px] p-[24px]"
className="flex flex-col gap-[24px] overflow-auto p-[24px]"
style={{
backgroundImage: `url(${basePath}/overview-bg.png)`,
backgroundSize: "cover",
borderRadius: 16,
}}
>
<div className="flex flex-row items-center gap-[16px]">
<div className="flex w-full flex-row items-center gap-[16px]">
<img
alt="Validator logo"
className="block w-[80px] rounded-full"
Expand Down Expand Up @@ -133,8 +133,8 @@ export default function ValidatorPage() {
</div>
)}
</div>
<DivisorHorizontal />
<div className="grid grid-cols-4">
<DivisorHorizontal className="min-w-[1000px]" />
<div className="grid min-w-[1000px] grid-cols-4">
<div className="relative">
<Heading8>Total Stake (XION)</Heading8>
<div className="mb-[8px] mt-[12px]">
Expand Down Expand Up @@ -184,8 +184,8 @@ export default function ValidatorPage() {
<Heading8>{formatXionToUSD(myDelegationToValidator)}</Heading8>
</div>
</div>
<DivisorHorizontal />
<div className="grid grid-cols-4">
<DivisorHorizontal className="min-w-[1000px]" />
<div className="grid min-w-[1000px] grid-cols-4">
<div className="col-span-2">
<Heading8 color="text-white">XION Address</Heading8>
<div className="inline-flex flex-row gap-2 break-all">
Expand Down

0 comments on commit 4721544

Please sign in to comment.