diff --git a/packages/keychain/index.html b/packages/keychain/index.html index 1c96ade2e..62608acd4 100644 --- a/packages/keychain/index.html +++ b/packages/keychain/index.html @@ -50,7 +50,7 @@ })(); -
+ diff --git a/packages/keychain/src/components/layout/container/header/Banner.tsx b/packages/keychain/src/components/layout/container/header/Banner.tsx index 27b396c9c..b359516c6 100644 --- a/packages/keychain/src/components/layout/container/header/Banner.tsx +++ b/packages/keychain/src/components/layout/container/header/Banner.tsx @@ -9,7 +9,6 @@ import { HStack, } from "@chakra-ui/react"; import { useControllerTheme } from "@/hooks/theme"; -import { useLayoutVariant } from "../"; import { TOP_BAR_HEIGHT } from "./TopBar"; import { IconProps } from "@cartridge/ui-next"; @@ -18,10 +17,19 @@ export type BannerProps = { icon?: React.ReactElement; title: string | React.ReactElement; description?: string | React.ReactElement; + variant?: BannerVariant; }; -export function Banner({ Icon, icon, title, description }: BannerProps) { + +export type BannerVariant = "expanded" | "compressed"; + +export function Banner({ + Icon, + icon, + title, + description, + variant = "compressed", +}: BannerProps) { const theme = useControllerTheme(); - const variant = useLayoutVariant(); switch (variant) { case "expanded": diff --git a/packages/keychain/src/components/layout/container/index.tsx b/packages/keychain/src/components/layout/container/index.tsx index 914095b8b..07fcbdea3 100644 --- a/packages/keychain/src/components/layout/container/index.tsx +++ b/packages/keychain/src/components/layout/container/index.tsx @@ -1,6 +1,5 @@ -import { PropsWithChildren, createContext, useContext, useState } from "react"; +import { PropsWithChildren } from "react"; import { Header, HeaderProps } from "./header"; -import { useDisclosure } from "@cartridge/ui-next"; export function Container({ children, @@ -12,39 +11,27 @@ export function Container({ icon, title, description, - variant = "compressed", className, -}: { - variant?: LayoutVariant; -} & PropsWithChildren & - HeaderProps & { className?: string }) { - const [height, setHeight] = useState(0); - - const { isOpen, onToggle } = useDisclosure(); + variant, +}: PropsWithChildren & HeaderProps & { className?: string }) { return ( -