diff --git a/packages/keychain/src/components/ErrorAlert.tsx b/packages/keychain/src/components/ErrorAlert.tsx index 21fdaee00..71188061a 100644 --- a/packages/keychain/src/components/ErrorAlert.tsx +++ b/packages/keychain/src/components/ErrorAlert.tsx @@ -4,6 +4,7 @@ import { CheckIcon, ErrorAlertIcon, ErrorAlertIconProps, + Button, } from "@cartridge/ui-next"; import { Text, @@ -16,7 +17,6 @@ import { Box, VStack, Link, - IconButton, Divider, } from "@chakra-ui/react"; import { motion } from "framer-motion"; @@ -105,27 +105,22 @@ export function ErrorAlert({ {description && ( {copyText && ( - - ) : ( - - ) - } + variant="icon" + className="absolute right-3 w-5 h-5 bg-[rgba(0,0,0,0.1)]" onClick={() => { setCopied(true); navigator.clipboard.writeText(copyText); }} - /> + > + {copied ? ( + + ) : ( + + )} + )} - void }) { if (!isIframe()) { @@ -8,15 +7,8 @@ export function BackButton({ onClick }: { onClick?: () => void }) { } return ( - } - onClick={onClick} - /> + ); } diff --git a/packages/keychain/src/components/layout/Container/Header/CloseButton.tsx b/packages/keychain/src/components/layout/Container/Header/CloseButton.tsx index 103030660..b8b87eede 100644 --- a/packages/keychain/src/components/layout/Container/Header/CloseButton.tsx +++ b/packages/keychain/src/components/layout/Container/Header/CloseButton.tsx @@ -1,6 +1,5 @@ -import { TimesIcon } from "@cartridge/ui-next"; +import { TimesIcon, Button } from "@cartridge/ui-next"; import { isIframe } from "@cartridge/utils"; -import { IconButton } from "@chakra-ui/react"; import { useConnection } from "@/hooks/connection"; import { useCallback } from "react"; @@ -24,14 +23,8 @@ export function CloseButton({ onClose }: { onClose?: () => void }) { } return ( - } - onClick={handleClose} - /> + ); } diff --git a/packages/keychain/src/components/layout/Container/Header/SettingsButton.tsx b/packages/keychain/src/components/layout/Container/Header/SettingsButton.tsx index ba962fd52..9b2e95f74 100644 --- a/packages/keychain/src/components/layout/Container/Header/SettingsButton.tsx +++ b/packages/keychain/src/components/layout/Container/Header/SettingsButton.tsx @@ -1,6 +1,5 @@ -import { DotsIcon } from "@cartridge/ui-next"; +import { Button, DotsIcon } from "@cartridge/ui-next"; import { isIframe } from "@cartridge/utils"; -import { IconButton } from "@chakra-ui/react"; export function SettingsButton({ onClick }: { onClick?: () => void }) { if (!isIframe()) { @@ -8,15 +7,8 @@ export function SettingsButton({ onClick }: { onClick?: () => void }) { } return ( - } - onClick={onClick} - /> + ); } diff --git a/packages/keychain/src/components/session/CollapsibleRow.tsx b/packages/keychain/src/components/session/CollapsibleRow.tsx deleted file mode 100644 index f9305f004..000000000 --- a/packages/keychain/src/components/session/CollapsibleRow.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { PropsWithChildren, useState } from "react"; -import { - Accordion, - AccordionContent, - AccordionItem, - AccordionTrigger, - CheckboxIcon, -} from "@cartridge/ui-next"; - -interface CollapsibleRowProps extends PropsWithChildren { - title: string; -} - -export function CollapsibleRow({ title, children }: CollapsibleRowProps) { - const [value, setValue] = useState(""); - - return ( - - - -
- -
{title}
-
-
- - - {children} - -
-
- ); -} diff --git a/packages/keychain/src/components/session/MessageCard.tsx b/packages/keychain/src/components/session/MessageCard.tsx index 4a25e14d9..0ce117c65 100644 --- a/packages/keychain/src/components/session/MessageCard.tsx +++ b/packages/keychain/src/components/session/MessageCard.tsx @@ -69,15 +69,15 @@ function MessageContent({ messages }: MessageContentProps) { {/* Domain section */} {Object.values(m.domain).filter((f) => typeof f !== "undefined") .length > 0 && ( - - {m.domain.name && ( - - )} - {/* ... other domain fields ... */} - - )} + + {m.domain.name && ( + + )} + {/* ... other domain fields ... */} + + )} diff --git a/packages/ui-next/src/components/primitives/button.tsx b/packages/ui-next/src/components/primitives/button.tsx index 980dd39ef..04bc49c19 100644 --- a/packages/ui-next/src/components/primitives/button.tsx +++ b/packages/ui-next/src/components/primitives/button.tsx @@ -19,7 +19,7 @@ const buttonVariants = cva( "bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80", ghost: "hover:bg-accent hover:text-accent-foreground", link: "text-primary underline-offset-4 hover:underline", - icon: "bg-background text-foreground", + icon: "bg-background text-foreground hover:bg-background/60", }, size: { default: "h-10 px-4 tracking-wide text-base",