From e2cbae02249bbb33d93cb7205f55aa9df18d5c23 Mon Sep 17 00:00:00 2001 From: ByteAtATime Date: Sat, 13 Apr 2024 11:52:52 -0700 Subject: [PATCH] re-export components and inputs --- packages/svelte/src/lib/components/Header.svelte | 2 +- .../scaffold-eth/connect-button/AddressInfoDropdown.svelte | 4 ++-- .../scaffold-eth/connect-button/AddressQRCodeModal.svelte | 2 +- .../scaffold-eth/connect-button/ConnectButton.svelte | 2 +- packages/svelte/src/lib/components/scaffold-eth/index.ts | 5 +++++ .../svelte/src/lib/components/scaffold-eth/inputs/index.ts | 5 +++++ packages/svelte/src/routes/+page.svelte | 2 +- .../routes/blockexplorer/_components/AddressComponent.svelte | 3 +-- .../blockexplorer/_components/TransactionsTable.svelte | 2 +- .../routes/blockexplorer/transaction/[txHash]/+page.svelte | 2 +- .../svelte/src/routes/debug/_components/ContractInput.svelte | 5 +---- .../svelte/src/routes/debug/_components/ContractUI.svelte | 3 +-- .../src/routes/debug/_components/DisplayTxResult.svelte | 2 +- .../routes/debug/_components/WriteOnlyFunctionForm.svelte | 2 +- 14 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 packages/svelte/src/lib/components/scaffold-eth/index.ts create mode 100644 packages/svelte/src/lib/components/scaffold-eth/inputs/index.ts diff --git a/packages/svelte/src/lib/components/Header.svelte b/packages/svelte/src/lib/components/Header.svelte index d7e85e2..164bacb 100644 --- a/packages/svelte/src/lib/components/Header.svelte +++ b/packages/svelte/src/lib/components/Header.svelte @@ -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"; diff --git a/packages/svelte/src/lib/components/scaffold-eth/connect-button/AddressInfoDropdown.svelte b/packages/svelte/src/lib/components/scaffold-eth/connect-button/AddressInfoDropdown.svelte index b4331b9..f69eb6b 100644 --- a/packages/svelte/src/lib/components/scaffold-eth/connect-button/AddressInfoDropdown.svelte +++ b/packages/svelte/src/lib/components/scaffold-eth/connect-button/AddressInfoDropdown.svelte @@ -1,6 +1,6 @@ diff --git a/packages/svelte/src/lib/components/scaffold-eth/connect-button/ConnectButton.svelte b/packages/svelte/src/lib/components/scaffold-eth/connect-button/ConnectButton.svelte index 635b3ce..d8bbffa 100644 --- a/packages/svelte/src/lib/components/scaffold-eth/connect-button/ConnectButton.svelte +++ b/packages/svelte/src/lib/components/scaffold-eth/connect-button/ConnectButton.svelte @@ -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"; diff --git a/packages/svelte/src/lib/components/scaffold-eth/index.ts b/packages/svelte/src/lib/components/scaffold-eth/index.ts new file mode 100644 index 0000000..a0456b3 --- /dev/null +++ b/packages/svelte/src/lib/components/scaffold-eth/index.ts @@ -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"; diff --git a/packages/svelte/src/lib/components/scaffold-eth/inputs/index.ts b/packages/svelte/src/lib/components/scaffold-eth/inputs/index.ts new file mode 100644 index 0000000..cc0078e --- /dev/null +++ b/packages/svelte/src/lib/components/scaffold-eth/inputs/index.ts @@ -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"; diff --git a/packages/svelte/src/routes/+page.svelte b/packages/svelte/src/routes/+page.svelte index fa7c6b8..3220435 100644 --- a/packages/svelte/src/routes/+page.svelte +++ b/packages/svelte/src/routes/+page.svelte @@ -1,5 +1,5 @@