Skip to content

Commit

Permalink
Adapt to ui-next CopyAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
JunichiSugiura committed Dec 23, 2024
1 parent ee063e8 commit 20a1e2f
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 31 deletions.
2 changes: 2 additions & 0 deletions packages/keychain/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ dist-ssr
*.sw?
stats.html
.vercel

storybook-static/
2 changes: 2 additions & 0 deletions packages/keychain/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { StoryParameters } from "./mock";
import { Provider } from "./provider";

import "../src/index.css";
import { SonnerToaster } from "@cartridge/ui-next";

const preview: Preview = {
parameters: {
Expand Down Expand Up @@ -41,6 +42,7 @@ const preview: Preview = {
(Story, { parameters }) => (
<Provider parameters={parameters as StoryParameters}>
<Story />
<SonnerToaster />
</Provider>
),
],
Expand Down
20 changes: 0 additions & 20 deletions packages/keychain/src/components/CopyAddress.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/keychain/src/components/Funding/DepositEth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import {
CopyIcon,
EthereumIcon,
StarknetColorIcon,
CopyAddress,
} from "@cartridge/ui-next";
import { useConnection } from "@/hooks/connection";
import { useToast } from "@/hooks/toast";
import { ETH_CONTRACT_ADDRESS } from "@/utils/token";
import { ErrorAlert } from "../ErrorAlert";
import { CopyAddress } from "@/components/CopyAddress";
import { parseEther } from "viem";
import { AmountSelection, DEFAULT_AMOUNT } from "./AmountSelection";
import { Balance } from "./Balance";
Expand Down
3 changes: 1 addition & 2 deletions packages/keychain/src/components/Funding/PurchaseCredits.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Container, Content, Footer } from "@/components/layout";
import { Button, Divider } from "@chakra-ui/react";
import { useCallback, useMemo, useState } from "react";
import { CheckIcon, CoinsIcon } from "@cartridge/ui-next";
import { CheckIcon, CoinsIcon, CopyAddress } from "@cartridge/ui-next";
import { useConnection } from "@/hooks/connection";
import { CopyAddress } from "../CopyAddress";
import { AmountSelection, DEFAULT_AMOUNT } from "./AmountSelection";
import { ErrorAlert } from "@/components/ErrorAlert";
import { Elements } from "@stripe/react-stripe-js";
Expand Down
3 changes: 1 addition & 2 deletions packages/keychain/src/components/Funding/StripeCheckout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { StripePaymentElementOptions } from "@stripe/stripe-js";
import { Button } from "@chakra-ui/react";
import { Container, Content, Footer } from "@/components/layout";
import { useController } from "@/hooks/controller";
import { CoinsIcon } from "@cartridge/ui-next";
import { CopyAddress } from "@/components/CopyAddress";
import { CoinsIcon, CopyAddress } from "@cartridge/ui-next";
import { ErrorAlert } from "@/components/ErrorAlert";

type StripeCheckoutProps = {
Expand Down
8 changes: 6 additions & 2 deletions packages/keychain/src/components/Funding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import { Container, Content, Footer } from "@/components/layout";
import { Button } from "@chakra-ui/react";
import { useState } from "react";
import { useConnection } from "@/hooks/connection";
import { CopyAddress } from "../CopyAddress";
import { ArrowIcon, CoinsIcon, EthereumIcon } from "@cartridge/ui-next";
import {
ArrowIcon,
CoinsIcon,
EthereumIcon,
CopyAddress,
} from "@cartridge/ui-next";
import { DepositEth } from "./DepositEth";
import { PurchaseCredits } from "./PurchaseCredits";
import { Balance } from "./Balance";
Expand Down
3 changes: 1 addition & 2 deletions packages/keychain/src/components/Policies.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
AccordionPanel,
Box,
} from "@chakra-ui/react";
import { FnIcon, WedgeIcon } from "@cartridge/ui-next";
import { FnIcon, WedgeIcon, CopyAddress } from "@cartridge/ui-next";
import { SessionPolicies } from "@cartridge/presets";
import { CopyAddress } from "./CopyAddress";

export function Policies({
title,
Expand Down
4 changes: 2 additions & 2 deletions packages/ui-next/src/components/primitives/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ const Checkbox = React.forwardRef<
checked === "indeterminate"
? "minus-line"
: checked
? "line"
: "unchecked-line"
? "line"
: "unchecked-line"
}
/>
</CheckboxPrimitive.Root>
Expand Down

0 comments on commit 20a1e2f

Please sign in to comment.