Skip to content

Commit

Permalink
checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Dec 16, 2024
1 parent 51e3359 commit f507b4f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions client/src/ui/components/resources/realm-transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { useEntities } from "@/hooks/helpers/useEntities";
import { useResourceManager } from "@/hooks/helpers/useResources";
import useUIStore from "@/hooks/store/useUIStore";
import Button from "@/ui/elements/Button";
import { Checkbox } from "@/ui/elements/Checkbox";
import { NumberInput } from "@/ui/elements/NumberInput";
import { ResourceIcon } from "@/ui/elements/ResourceIcon";
import { currencyFormat } from "@/ui/utils/utils";
import { ResourcesIds, findResourceById } from "@bibliothecadao/eternum";
import { Switch } from "@headlessui/react";
import { Dispatch, SetStateAction, memo, useCallback, useState } from "react";
import { num } from "starknet";
import { OSWindow } from "../navigation/OSWindow";
Expand Down Expand Up @@ -41,11 +41,14 @@ export const RealmTransfer = memo(
onClick={() => togglePopup(resource.toString())}
show={isOpen}
>
<div>
<Switch
checked={type === "send"}
onChange={() => setType((prev) => (prev === "send" ? "receive" : "send"))}
/>
<div className="p-1">
<div
className="flex space-x-2 items-center cursor-pointer"
onClick={() => setType((prev) => (prev === "send" ? "receive" : "send"))}
>
<Checkbox enabled={type === "send"} />
<div>{type === "send" ? "Send Resources" : "Receive Resources"}</div>
</div>
</div>
<div className="p-4">
<div>
Expand Down

0 comments on commit f507b4f

Please sign in to comment.