Skip to content

Commit

Permalink
Fix content height
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Jan 10, 2025
1 parent 8b6773d commit 264e5c9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions packages/keychain/src/components/layout/Content.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { cn } from "@cartridge/ui-next";
import { PropsWithChildren } from "react";

export function Content({
children,
className,
Expand Down
4 changes: 2 additions & 2 deletions packages/keychain/src/components/layout/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ function ResponsiveWrapper({ children }: PropsWithChildren) {
return (
<>
{/* for desktop */}
<div className="hidden md:flex flex-col items-center justify-center">
<div className="w-desktop border border-muted rounded-xl overflow-hidden flex flex-col relative">
<div className="hidden min-h-screen md:flex flex-col items-center justify-center">
<div className="w-desktop border border-muted rounded-xl flex flex-col relative overflow-hidden">
{children}
</div>
</div>
Expand Down
5 changes: 4 additions & 1 deletion packages/keychain/src/components/layout/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export function Footer({
const ref = useRef<HTMLDivElement | null>(null);

useEffect(() => {
if (!ref.current) return;
if (!ref.current) {
document.documentElement.style.setProperty("--footer-height", "0px");
return;
}

const observer = new ResizeObserver((entries) => {
const rect = entries[0].contentRect;
Expand Down
4 changes: 3 additions & 1 deletion packages/keychain/src/components/settings/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GearIcon, Button } from "@cartridge/ui-next";
import { useState } from "react";
import { Container, Footer } from "@/components/layout";
import { Container, Content, Footer } from "@/components/layout";
import { Recovery } from "./Recovery";
import { Delegate } from "./Delegate";
import { useConnection } from "@/hooks/connection";
Expand Down Expand Up @@ -71,6 +71,7 @@ export function Settings() {

return (
<Container variant="compressed" title="Controller Settings" Icon={GearIcon}>
<Content />
{/* <Content>
<VStack gap="30px" w="full">
<VStack>
Expand Down Expand Up @@ -158,6 +159,7 @@ export function Settings() {
</VStack>
</VStack>
</Content> */}

<Footer>
<Button variant="secondary" onClick={logout}>
Log out
Expand Down

0 comments on commit 264e5c9

Please sign in to comment.