Skip to content

Commit

Permalink
re-export components and inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
ByteAtATime committed Apr 13, 2024
1 parent 12a1ab4 commit e2cbae0
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/svelte/src/lib/components/Header.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import logo from "$lib/assets/logo.svg";
import { Bars3, BugAnt, Icon, type IconSource } from "svelte-hero-icons";
import ConnectButton from "$lib/components/scaffold-eth/connect-button/ConnectButton.svelte";
import FaucetButton from "$lib/components/scaffold-eth/FaucetButton.svelte";
import { FaucetButton } from "$lib/components/scaffold-eth";
import { createOutsideClick } from "$lib/runes/outsideClick.svelte";
import { derived } from "svelte/store";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import BlockieAvatar from "$lib/components/scaffold-eth/BlockieAvatar.svelte";
import { isENS } from "$lib/components/scaffold-eth/inputs/utils";
import { BlockieAvatar } from "$lib/components/scaffold-eth";
import { isENS } from "$lib/components/scaffold-eth/inputs";
import { getAddress, type Address } from "viem";
import {
Icon,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import type { Address as AddressType } from "viem";
import QRCode from "@castlenine/svelte-qrcode";
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address } from "$lib/components/scaffold-eth";
const { address, modalId }: { address: AddressType; modalId: string } = $props();
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import scaffoldConfig from "$lib/scaffold.config";
import { createAccount, createEnsName, createEnsAvatar } from "@byteatatime/wagmi-svelte";
import WrongNetworkDropdown from "./WrongNetworkDropdown.svelte";
import Balance from "$lib/components/scaffold-eth/Balance.svelte";
import { Balance } from "$lib/components/scaffold-eth";
import type { Address } from "viem/accounts";
import { createNetworkColor } from "$lib/runes/networkColor.svelte";
import AddressInfoDropdown from "./AddressInfoDropdown.svelte";
Expand Down
5 changes: 5 additions & 0 deletions packages/svelte/src/lib/components/scaffold-eth/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { default as Address } from "./Address.svelte";
export { default as Balance } from "./Balance.svelte";
export { default as BlockieAvatar } from "./BlockieAvatar.svelte";
export { default as Faucet } from "./Faucet.svelte";
export { default as FaucetButton } from "./FaucetButton.svelte";
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { default as InputBase } from "./InputBase.svelte";
export { default as AddressInput } from "./AddressInput.svelte";
export { default as EtherInput } from "./EtherInput.svelte";
export { default as IntegerInput } from "./IntegerInput.svelte";
export * from "./utils";
2 changes: 1 addition & 1 deletion packages/svelte/src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address } from "$lib/components/scaffold-eth";
import { createAccount } from "@byteatatime/wagmi-svelte";
import { BugAnt, Icon, MagnifyingGlass } from "svelte-hero-icons";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<script lang="ts">
import BackButton from "./BackButton.svelte";
import Address from "$lib/components/scaffold-eth/Address.svelte";
import Balance from "$lib/components/scaffold-eth/Balance.svelte";
import { Address, Balance } from "$lib/components/scaffold-eth";
import ContractTabs from "./ContractTabs.svelte";
const { address, contractData }: { address: string; contractData: { bytecode: string; assembly: string } | null } =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address } from "$lib/components/scaffold-eth";
import { createTargetNetwork } from "$lib/runes/targetNetwork.svelte";
import type { TransactionWithFunction, TransactionsTableProps } from "$lib/utils/scaffold-eth/block";
import { formatEther } from "viem";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { page } from "$app/stores";
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address } from "$lib/components/scaffold-eth";
import { createTargetNetwork } from "$lib/runes/targetNetwork.svelte";
import { replacer } from "$lib/utils/scaffold-eth/common";
import { decodeTransactionData, getFunctionDetails } from "$lib/utils/scaffold-eth/decodeTxData";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<script lang="ts">
import type { AbiParameter } from "abitype";
import AddressInput from "$lib/components/scaffold-eth/inputs/AddressInput.svelte";
import InputBase from "$lib/components/scaffold-eth/inputs/InputBase.svelte";
import IntegerInput from "$lib/components/scaffold-eth/inputs/IntegerInput.svelte";
import { IntegerVariant } from "$lib/components/scaffold-eth/inputs/utils";
import { AddressInput, InputBase, IntegerInput, IntegerVariant } from "$lib/components/scaffold-eth/inputs";
const {
setForm,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts">
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address, Balance } from "$lib/components/scaffold-eth";
import { createDeployedContractInfo } from "$lib/runes/deployedContractInfo.svelte";
import { createTargetNetwork } from "$lib/runes/targetNetwork.svelte";
import type { ContractName } from "$lib/utils/scaffold-eth/contract";
import { createNetworkColor } from "$lib/runes/networkColor.svelte";
import Balance from "$lib/components/scaffold-eth/Balance.svelte";
import ContractVariables from "./ContractVariables.svelte";
import ContractReadMethods from "./ContractReadMethods.svelte";
import ContractWriteMethods from "./ContractWriteMethods.svelte";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { formatEther, isAddress, type TransactionBase, type TransactionReceipt } from "viem";
import { replacer } from "$lib/utils/scaffold-eth/common";
import Address from "$lib/components/scaffold-eth/Address.svelte";
import { Address } from "$lib/components/scaffold-eth";
type DisplayContent =
| string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
} from "./utils";
import InheritanceTooltip from "./InheritanceTooltip.svelte";
import ContractInput from "./ContractInput.svelte";
import IntegerInput from "$lib/components/scaffold-eth/inputs/IntegerInput.svelte";
import { IntegerInput } from "$lib/components/scaffold-eth/inputs";
import { createTargetNetwork } from "$lib/runes/targetNetwork.svelte";
import { createTransactor } from "$lib/runes/transactor.svelte";
Expand Down

0 comments on commit e2cbae0

Please sign in to comment.